class
DocumentDocument class to hold a database document and help with JSON serialization.
Contents
- Reference
Base classes
- class JSONBase
- Base class to interact with JSON serialization library.
Public functions
- auto deserialize(const rapidjson::Value& obj) override -> bool virtual
- Deserialize document state from JSON object.
- auto deserialize(const std::string& s) override -> bool virtual
- Deserialize helper from JSON in string.
- auto serialize(rapidjson::Writer<rapidjson::StringBuffer>* writer) const override -> bool virtual
- auto serialize() const override -> std::string virtual
- Serialize JSON writer helper.
Function documentation
bool piac:: Document:: deserialize(const rapidjson::Value& obj) override virtual
Deserialize document state from JSON object.
Parameters | |
---|---|
obj in | Input JSON object |
Returns | True if no error occurred |
bool piac:: Document:: deserialize(const std::string& s) override virtual
Deserialize helper from JSON in string.
Parameters | |
---|---|
s in | String containing JSON format to deserialize |
Returns | True if successful |
bool piac:: Document:: serialize(rapidjson::Writer<rapidjson::StringBuffer>* writer) const override virtual
Parameters | |
---|---|
writer in | Pointer to rapidjson write object to write object to |
Returns | True if no error occurred |
std::string piac:: Document:: serialize() const override virtual
Serialize JSON writer helper.
Returns | Serialized JSON data |
---|