![]() |
Utilities
Utilities header only library
|
Serialization utility class. Can perform automatic read and write. More...
Public Member Functions | |
| Serializer (const std::string &root_name) | |
| std::vector< Type > | FromJsonString (const std::string &json_string) const |
| Read JSON string. | |
| std::vector< std::shared_ptr< Type > > | FromJsonStringAsPtr (const std::string &json_string) const |
| Read JSON string, return as shared pointers. | |
| std::string | ToJsonString (const std::vector< Type > &objects) const |
| Serialize to JSON string. | |
| std::vector< Type > | FromJsonFile (const std::string &file_path) const |
| Read from JSON file by path. | |
| std::vector< std::shared_ptr< Type > > | FromJsonFileAsPtr (const std::string &file_path) const |
| Read from JSON file by path, return as shared pointers. | |
| bool | ToJsonFile (const std::vector< Type > &objects, const std::string &file_path) const |
| Serialize to JSON string and save to file. | |
Serialization utility class. Can perform automatic read and write.
Uses the "cereal" serialization library - https://uscilab.github.io/cereal/index.html. Cereal allows the possibility to save-load in formats: