Android/C++ data serialization

落爺英雄遲暮 提交于 2019-12-24 17:44:00

问题


What is the best way or library to exchange data/serialize structures between c++ server and android client? Performance is essential. Compression is preffered. Right now I am trying to implement packet exchange using msgpack (https://github.com/msgpack/msgpack-java) - for android side.


回答1:


Msgpack/protobuf are fine for this task.

But Msgpack does not fully supports 'optional' values or versioning (it can be important for your application). On the other hand, I'm not sure that all protobuf-RPC implementations are compatible to each other (Msgpack-RPC protocol is the same for every platform/implementation).



来源:https://stackoverflow.com/questions/15579730/android-c-data-serialization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!