Serialize C++ object to send via sockets to Python - best approach?

时光怂恿深爱的人放手 提交于 2019-12-03 00:38:07

Go for Protocol Buffers - Google Code which has enough resource for and . You can make a compatible structure which is readable in both languages.

Protocol Buffers are a method of serializing structured data. As such, they are useful in developing programs to communicate with each other over a wire or for storing data. The method involves an interface description language that describes the structure of some data and a program that generates from that description source code in various programming languages for generating or parsing a stream of bytes that represents the structured data.

Protocol Buffers' successor, Cap'n Proto, also has good support for C++ and Python. (Disclosure: I am the author of Cap'n Proto, and also was the author of most of the Protobuf code released by Google.)

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