开发者

Android to Google App Engine serialization exception

开发者 https://www.devze.com 2023-03-09 20:22 出处:网络
I\'m serializing an object graph in the android code and pass result to GAE servlet. While deserializing I sometimes get the following exception:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消