cereal

Header-only C++11 library for serialization to/from JSON, XML, and binary

brewmacoslinux
Try with needOr install directly
Source

About

C++11 library for serialization

Commands

cereal

Examples

Include cereal headers in C++ project for JSON serialization$ #include <cereal/cereal.hpp> #include <cereal/archives/json.hpp>
Serialize C++ object to JSON file using cereal$ std::ofstream os("data.json"); cereal::JSONOutputArchive archive(os); archive(myObject);
Deserialize C++ object from JSON file using cereal$ std::ifstream is("data.json"); cereal::JSONInputArchive archive(is); archive(myObject);