Represents a JSON object that behaves like a dictionary.
More...
#include <Json.hpp>
|
template<typename T > |
void | set (const std::string &key, const T &value) |
| Sets a member value of the object. More...
|
|
void | set (const std::string &key, const char *value) |
| Sets a member value of the object. More...
|
|
void | set (const std::string &key, const Object &value) |
| Sets a member value of the object. More...
|
|
void | set (const std::string &key, const Array &value) |
| Sets a member value of the object. More...
|
|
virtual void | str (std::ostream &s, unsigned int level=0) const override |
| Writes the object's JSON string representation into the given stream. More...
|
|
std::string | str () const |
| Returns the object's JSON string representation. More...
|
|
std::string | str () const |
| Returns this value's JSON string representation. More...
|
|
Represents a JSON object that behaves like a dictionary.
Definition at line 153 of file Json.hpp.
◆ set() [1/4]
template<typename T >
void tdc::json::Object::set |
( |
const std::string & |
key, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Sets a member value of the object.
- Template Parameters
-
- Parameters
-
key | the member name |
value | the value |
Definition at line 164 of file Json.hpp.
◆ set() [2/4]
void tdc::json::Object::set |
( |
const std::string & |
key, |
|
|
const char * |
value |
|
) |
| |
|
inline |
Sets a member value of the object.
- Parameters
-
key | the member name |
value | the C string value |
Definition at line 172 of file Json.hpp.
◆ set() [3/4]
void tdc::json::Object::set |
( |
const std::string & |
key, |
|
|
const Object & |
value |
|
) |
| |
|
inline |
Sets a member value of the object.
- Parameters
-
key | the member name |
value | the object |
Definition at line 180 of file Json.hpp.
◆ set() [4/4]
void tdc::json::Object::set |
( |
const std::string & |
key, |
|
|
const Array & |
value |
|
) |
| |
|
inline |
Sets a member value of the object.
- Parameters
-
key | the member name |
value | the array |
Definition at line 188 of file Json.hpp.
◆ str() [1/2]
virtual void tdc::json::Object::str |
( |
std::ostream & |
s, |
|
|
unsigned int |
level = 0 |
|
) |
| const |
|
inlineoverridevirtual |
Writes the object's JSON string representation into the given stream.
- Parameters
-
s | the output stream to write to |
level | the indentation level |
Implements tdc::json::Value.
Definition at line 197 of file Json.hpp.
◆ str() [2/2]
std::string tdc::json::Object::str |
( |
| ) |
const |
|
inline |
Returns the object's JSON string representation.
- Returns
- the object's JSON string representation
Definition at line 218 of file Json.hpp.
The documentation for this class was generated from the following file: