C++ Serialize、DeSerialize, 使用C11与rapidJson,自动完成序列化与反序列化, 包含头文件即可直接使用,无其他依赖。
C11 with rapidjson
- copy dir "source" to your project.
- include "serialize.hpp".
- you can use now.
- simple object use
PropertyObject<int> my("Speed",10);
my.Set(333);
std::string str = my.ToSerializeString(); //序列化
PropertyObject<int> my2("Speed", 0);
my2.FromSerializeString(str );
int nSpeed = my2.Get();
- for multi object use you can find example in dir example
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request