Right my my application saves its objects as xml. The开发者_如何学JAVA reason why I am considering serializing the objects is for a speed gain. Are there any other benefits of serializing?
There's one downside that has nothing to do with performance: You can't retrieve the serialized data if you ever change the underlying objects. If the data is long-lived, you could be setting yourself up for a rigid object model.
XML the advantage of leaving open the possibility of "duck typing"; so does JSON, and it's lighter than XML.
give json a try. its more lightweight.
object serialisation has given me many headaches in the past particually in an ever changing domain model
精彩评论