开发者

Android - custom serialization approach

开发者 https://www.devze.com 2023-04-03 13:42 出处:网络
I have tried XML/JSON object serialization, but开发者_C百科 I am thinking of custom serialization. Up to now, I haven\'t found any solutions, which included XML/JSON solutions. Is it bad way of thinki

I have tried XML/JSON object serialization, but开发者_C百科 I am thinking of custom serialization. Up to now, I haven't found any solutions, which included XML/JSON solutions. Is it bad way of thinking of implementing serialization on my own? Can I get better results then ready made solutions?

thx


I think JSON is the best for communicating between client and server. Look at this for a nice example: http://developer.android.com/reference/android/util/JsonReader.html


There is a bunch of custom serialization frameworks already available - protobuf, Kryo, etc. As far as I know at least protobuf should work on Android. Here is a nice overview (not related to Android though) http://tech.puredanger.com/2011/05/27/serialization-comparison/

0

精彩评论

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