java serialization Protostuff serialization

java.io.Serializable

       Identifying an object needs to be serialized, and the object type needs to implement the Serializable interface. For the understanding of serialization, you can refer to the article " Advanced Understanding of Java Serialization " by the IBM community . This article directly takes the conclusion of the document.

       1. The serialization ID of the serialized type and the deserialized type must be the same (during remote information exchange).

       2. Static data will not be serialized, and fields modified by the Transient keyword will not be serialized.

       3. When the object is serialized and stored, it will be optimized to store the same value object twice (the second object write will only store the reference).

  4. To serialize the parent class object, you need to implement the Serializable interface for the parent class object as well.

 

  Serialization can also be customized, such as ProtoStuff, etc.

  For serialization related knowledge, please refer to: Advanced understanding of Java serialization

               Protostuff serialization

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324736449&siteId=291194637