JSON representation of datatypes via toJSON.  
 More...
#include <zypp/base/Json.h>
|  | 
|  | Value () | 
|  | Default ctor (null) 
 | 
|  | 
|  | Value (const Value &rhs) | 
|  | Copy ctor. 
 | 
|  | 
| template<class T> | 
|  | Value (const T &val_r) | 
|  | Ctor creating a JSON representation of T via toJSON(T) 
 | 
|  | 
| const std::string & | asJSON () const | 
|  | JSON representation. 
 | 
|  | 
| const std::string & | asString () const | 
|  | String representation. 
 | 
|  | 
| std::ostream & | dumpOn (std::ostream &str) const | 
|  | Stream output. 
 | 
|  | 
|  | 
| (Note that these are not member symbols.)  | 
| std::ostream & | operator<< (std::ostream &str, const Value &obj) | 
|  | Stream output. 
 | 
|  | 
JSON representation of datatypes via toJSON. 
namespace mynamspace
{
  struct Mydata
  {...};
 
  std::string 
toJSON( 
const Mydata & )
}
 
mynamspace::Mydata data;
json::Object bigone {
  { "mydata",  data },
  { "panic",   false },
  { "nested",  json::Object{ {"one",1}, {"two",2}, {"three",3} } }
};
 
cout << bigone << endl;
std::string asJSON() const
JSON representation.
- See also
- http://www.json.org/ 
Definition at line 202 of file Json.h.
◆ Value() [1/3]
  
  | 
        
          | zypp::json::Value::Value | ( |  | ) |  |  | inline | 
 
Default ctor (null) 
Definition at line 205 of file Json.h.
 
 
◆ Value() [2/3]
  
  | 
        
          | zypp::json::Value::Value | ( | const Value & | rhs | ) |  |  | inline | 
 
Copy ctor. 
Definition at line 208 of file Json.h.
 
 
◆ Value() [3/3]
template<class T> 
  
  | 
        
          | zypp::json::Value::Value | ( | const T & | val_r | ) |  |  | inline | 
 
Ctor creating a JSON representation of T via toJSON(T) 
Definition at line 212 of file Json.h.
 
 
◆ asJSON()
  
  | 
        
          | const std::string & zypp::json::Value::asJSON | ( |  | ) | const |  | inline | 
 
JSON representation. 
Definition at line 215 of file Json.h.
 
 
◆ asString()
  
  | 
        
          | const std::string & zypp::json::Value::asString | ( |  | ) | const |  | inline | 
 
 
◆ dumpOn()
  
  | 
        
          | std::ostream & zypp::json::Value::dumpOn | ( | std::ostream & | str | ) | const |  | inline | 
 
Stream output. 
Definition at line 223 of file Json.h.
 
 
◆ operator<<()
  
  | 
        
          | std::ostream & operator<< | ( | std::ostream & | str, |  
          |  |  | const Value & | obj ) |  | related | 
 
Stream output. 
Definition at line 231 of file Json.h.
 
 
◆ _data
  
  | 
        
          | std::string zypp::json::Value::_data |  | private | 
 
 
The documentation for this class was generated from the following file: