#include <Object.h>
Definition at line 217 of file Object.h.
◆ Root()
◆ set() [1/2]
template<typename Scalar >
| void Json::Object::set |
( |
std::string const & |
key, |
|
|
Scalar const & |
value |
|
) |
| |
|
inherited |
Set a scalar value in the Object for a key.
A JSON scalar is a single value - a number, string, boolean, nullptr or a Json::Value.
set() throws an exception if this object is disabled (which means that one of its children is enabled).
In a debug build, set() also throws an exception if the key has already been set() before.
An operator[] is provided to allow writing object["key"] = scalar;.
Definition at line 388 of file Object.h.
◆ set() [2/2]
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ setObject()
Make a new Object at a key and return it.
This Object is disabled until that sub-object is destroyed. Throws an exception if this Object was already disabled.
Definition at line 68 of file Object.cpp.
◆ setArray()
Make a new Array at a key and return it.
This Object is disabled until that sub-array is destroyed. Throws an exception if this Object was already disabled.
Definition at line 77 of file Object.cpp.
◆ checkWritable()
| void Json::Collection::checkWritable |
( |
std::string const & |
label | ) |
|
|
protectedinherited |
◆ parent_
◆ writer_
| Writer* Json::Collection::writer_ |
|
protectedinherited |
◆ enabled_
| bool Json::Collection::enabled_ |
|
protectedinherited |