![]() |
Utilities
Utilities header only library
|
Abstration of a class that supports serialization to json strings. More...
Public Member Functions | |
| std::string | Serialize () const |
| Stores object to json string. | |
| bool | Deserialize (const std::string &json_string) |
| Loads object from json string. | |
| virtual void | AddToJsonNode (nlohmann::json &node) const =0 |
| Fill data of this to json node. | |
| virtual bool | ReadFromJsonNode (const nlohmann::json &node)=0 |
| Read json node and initialize this. More... | |
Abstration of a class that supports serialization to json strings.
When inheriting this class, be sure to overload methods AddToJsonNode and ReadFromJsonNode, that should contain implementation of your json serialization.
|
pure virtual |
Read json node and initialize this.
| nlohmann::json::exception | when required keys are missing. |
Implemented in utils::IntrinsicParams, and utils::ScannerParams.