Is it possible to serialize and deserialize a class in C++?

前端 未结 13 2640
我寻月下人不归
我寻月下人不归 2020-11-22 02:18

Is it possible to serialize and deserialize a class in C++?

I\'ve been using Java for 3 years now, and serialization / deserialization is fairly trivial in that lang

13条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 02:46

    I recommend Google protocol buffers. I had the chance to test drive the library on a new project and it's remarkably easy to use. The library is heavily optimized for performance.

    Protobuf is different than other serialization solutions mentioned here in the sense that it does not serialize your objects, but rather generates code for objects that are serialization according to your specification.

提交回复
热议问题