Serializable is used for ObjectInput(Output)Stream. Objects that implement this interface will have one.
Constant for serialVersionUID.
The sequence of fastJson "turns" an object into a json file. If the Serializable interface is implemented, there will be a serialVersionUID attribute.
You can save the serialVersionUID value of the current object during serialization. When deserializing the conversation, check whether it is equal to the last saved value. At this time, you can judge whether they are the same object.
——————Java newbie, please don’t spray lightly
No special configuration is required for fastjson serialization and deserialization. The only requirement is that the class you serialize conforms to the Java bean specification.
Serializable is used for ObjectInput(Output)Stream. Objects that implement this interface will have one.
Constant for serialVersionUID.
The sequence of fastJson "turns" an object into a json file. If the Serializable interface is implemented, there will be a serialVersionUID attribute.
You can save the serialVersionUID value of the current object during serialization. When deserializing the conversation, check whether it is equal to the last saved value. At this time, you can judge whether they are the same object.
——————Java newbie, please don’t spray lightly
https://github.com/alibaba/fastjson/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E...
If the object
equals
method is not overridden, the comparison result is not equal, and the comparison is the memory address.