cpp use nlohmann::json for serialization Here some samples of how to use nlohmann::json for (de)serialization Define a struct following macro in it: NLOHMANN_DEFINE_TYPE_INTRUSIVE(Struct-name, member1, member2,...)This will add everything