#include <json_writer.h>
◆ Json_writer()
keyring_common::json_data::Json_writer::Json_writer |
( |
const std::string |
data = {} , |
|
|
const std::string |
version = "1.0" , |
|
|
const std::string |
version_key = "version" , |
|
|
const std::string |
array_key = "elements" |
|
) |
| |
Constructor.
- Parameters
-
[in] | data | JSON data |
[in] | version | Version information |
[in] | version_key | Writer version key |
[in] | array_key | Key to array that stores all elements |
◆ ~Json_writer()
virtual keyring_common::json_data::Json_writer::~Json_writer |
( |
| ) |
|
|
virtualdefault |
◆ add_element()
Add an element.
- Parameters
-
[in] | metadata | Data identifier |
[in] | data | Data |
- Returns
- status of insertion
- Return values
-
◆ num_elements()
size_t keyring_common::json_data::Json_writer::num_elements |
( |
| ) |
const |
Number of elements stored.
Get number of elements in the document.
- Returns
- number elements in the document
◆ remove_element()
Remove an element.
- Parameters
-
[in] | metadata | Data identifier |
- Returns
- status of removal
- Return values
-
◆ set_data()
bool keyring_common::json_data::Json_writer::set_data |
( |
const std::string |
data | ) |
|
◆ to_string()
const std::string keyring_common::json_data::Json_writer::to_string |
( |
| ) |
const |
Get string representation of the JSON document.
◆ valid()
bool keyring_common::json_data::Json_writer::valid |
( |
| ) |
const |
|
inline |
Validity of the document.
◆ array_key_
const std::string keyring_common::json_data::Json_writer::array_key_ |
|
private |
◆ document_
rapidjson::Document keyring_common::json_data::Json_writer::document_ |
|
private |
◆ valid_
bool keyring_common::json_data::Json_writer::valid_ |
|
private |
◆ version_key_
const std::string keyring_common::json_data::Json_writer::version_key_ |
|
private |
The documentation for this class was generated from the following files: