0 votes
in Java by
What is the alternative for Java Serialization? If the java Serialization is not used, is it possible to persist an object using any other approach?

1 Answer

0 votes

There are following alternative way of java Serialization. Java objects can serialized through following ways:

  • DataBase:- Saving object state to database, this is most common way to used by allmost applications. You can use ORM tools (e.g. Hibernate, JPA etc.) to save objects into a database and read them from the database.
  • XML:- Another way to store data into Xml. This is one of the popular mechanism, and a lot of XML based web services use this mechanism to transfer data over network. A lot of tools save XML files to persist data/configurations.
  • JSON:- This is a recently used popular data transfer format. A lot of web services are being developed in JSON due to its small footprint and inherent integration with web browser due to JavaScript format.

Share:- Whatsapp Facebook Facebook

Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.