#include <json_writer.h>
 | 
| virtual bool  | set_property (const std::string &property_key, const std::string &property) | 
|   | Set a property in the main JSON object.  More...
  | 
|   | 
◆ 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 | ) | 
           | 
        
      
 
 
◆ set_property()
  
  
      
        
          | bool keyring_common::json_data::Json_writer::set_property  | 
          ( | 
          const std::string &  | 
          property_key,  | 
         
        
           | 
           | 
          const std::string &  | 
          property  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protectedvirtual   | 
  
 
Set a property in the main JSON object. 
It is intended to be used by derived classes, so it is possible to store some specific, data file-wide properties.
- Parameters
 - 
  
    | [in] | property_key | key (name) of the property  | 
    | [in] | property | value of the property | 
  
   
- Returns
 - status 
 
- Return values
 - 
  
  
 
 
 
◆ to_string()
      
        
          | 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: