I'm serializing an object graph in the android code and pass result to GAE servlet. While deserializing I sometimes get the following exception:
java.io.StreamCorruptedException: invalid type code: 71
I traced the problem down to one of the fields. If I set it to null or mark as tran开发者_运维问答sient the problem disappears. But, if I serialize/deserialize only this field - I don't see any problems as well.
Any ideas?
I suggest to use JSON or Google Protocol Buffers instead of own serialization code. It is much easier to extend and maintain. XML is also an option, but it is the slowest to serialize/deserialize and also the least compact format compared to JSON / protobuf.
精彩评论