Saving of nom::Value objects to JSON documents using the JsonCpp library.
More...
#include <JsonCppSerializer.hpp>
|
| | JsonCppSerializer (void) |
| | Default constructor; initialize the writer with human friendly output.
|
|
| ~JsonCppSerializer (void) |
| | Destructor.
|
|
| JsonCppSerializer (enum SerializerOptions options) |
| | Construct a parser with a feature set enumeration.
|
| std::string | serialize (const Value &source) |
| | Output a nom::Value object to a string.
|
| bool | save (const Value &source, const std::string &filename) |
| | Convenience method provided to output JSON-formatted data to a file.
|
|
|
bool | write (const Value &source, Json::Value &dest) const |
| bool | write_value (const Value &object, Json::Value &dest) const |
| bool | write_array_value (const Value &object, Json::Value &dest) const |
| bool | write_array (const Value &object, Json::Value &dest) const |
| | Internal helper method for serialization of array nodes.
|
| bool | write_object (const Value &object, Json::Value &dest) const |
| | Internal helper method for serialization of object nodes.
|
Saving of nom::Value objects to JSON documents using the JsonCpp library.
[TO BE WRITTEN]
Definition at line 62 of file JsonCppSerializer.hpp.
◆ SelfType
◆ JsonCppSerializer()
| nom::JsonCppSerializer::JsonCppSerializer |
( |
void | | ) |
|
Default constructor; initialize the writer with human friendly output.
◆ save()
| bool nom::JsonCppSerializer::save |
( |
const Value & | source, |
|
|
const std::string & | filename ) |
|
virtual |
Convenience method provided to output JSON-formatted data to a file.
- Parameters
-
| source | nom::Value container to serialize from. |
| filename | Absolute file path to output resulting data to. |
- Note
- Implements ISerializer interface.
Implements nom::IValueSerializer.
◆ serialize()
| std::string nom::JsonCppSerializer::serialize |
( |
const Value & | source | ) |
|
|
virtual |
Output a nom::Value object to a string.
- Parameters
-
- Returns
- std::string with JSON-conforming output on success, or a null- terminated string on err.
- Note
- Implements ISerializer interface.
Implements nom::IValueSerializer.
◆ write_array()
| bool nom::JsonCppSerializer::write_array |
( |
const Value & | object, |
|
|
Json::Value & | dest ) const |
|
private |
Internal helper method for serialization of array nodes.
- Todo
- Err handling where used in code
◆ write_array_value()
| bool nom::JsonCppSerializer::write_array_value |
( |
const Value & | object, |
|
|
Json::Value & | dest ) const |
|
private |
- Todo
- Err handling where used in code
◆ write_object()
| bool nom::JsonCppSerializer::write_object |
( |
const Value & | object, |
|
|
Json::Value & | dest ) const |
|
private |
Internal helper method for serialization of object nodes.
- Todo
- Err handling where used in code
◆ write_value()
| bool nom::JsonCppSerializer::write_value |
( |
const Value & | object, |
|
|
Json::Value & | dest ) const |
|
private |
- Todo
- Err handling where used in code
◆ options_
| enum SerializerOptions nom::JsonCppSerializer::options_ |
|
private |
The documentation for this class was generated from the following file: