#include <JsonObject.hpp>
◆ CIterType
◆ IterType
◆ JsonPair
◆ JsonPairRef
◆ JsonValRef
◆ MapType
◆ ~JsonObject()
| Thoth::NJson::JsonObject::~JsonObject |
( |
| ) |
|
◆ JsonObject() [1/5]
| Thoth::NJson::JsonObject::JsonObject |
( |
| ) |
|
|
default |
◆ JsonObject() [2/5]
| Thoth::NJson::JsonObject::JsonObject |
( |
JsonObject && |
other | ) |
|
|
noexcept |
◆ JsonObject() [3/5]
| Thoth::NJson::JsonObject::JsonObject |
( |
const JsonObject & |
other | ) |
|
◆ JsonObject() [4/5]
| Thoth::NJson::JsonObject::JsonObject |
( |
MapType && |
initAs | ) |
|
|
explicit |
Create with an existing map.
◆ JsonObject() [5/5]
| Thoth::NJson::JsonObject::JsonObject |
( |
std::initializer_list< JsonPair > |
init | ) |
|
◆ begin() [1/2]
| IterType Thoth::NJson::JsonObject::begin |
( |
| ) |
|
|
inline |
◆ begin() [2/2]
| CIterType Thoth::NJson::JsonObject::begin |
( |
| ) |
const |
|
inline |
◆ Clear()
| void Thoth::NJson::JsonObject::Clear |
( |
| ) |
|
◆ Empty()
| bool Thoth::NJson::JsonObject::Empty |
( |
| ) |
const |
◆ end() [1/2]
| IterType Thoth::NJson::JsonObject::end |
( |
| ) |
|
|
inline |
◆ end() [2/2]
| CIterType Thoth::NJson::JsonObject::end |
( |
| ) |
const |
|
inline |
◆ Exists() [1/3]
check if a key exists.
- Parameters
-
| key | The key to be checked. |
- Returns
- True if the key exists, false otherwise.
◆ Exists() [2/3]
check if a key=val exists.
- Parameters
-
| key | The key to be checked. |
| val | The value to be checked. |
- Returns
- True if the key-value pair exists, false otherwise.
◆ Exists() [3/3]
| bool Thoth::NJson::JsonObject::Exists |
( |
JsonPairRef |
p | ) |
const |
check if a key exists.
- Parameters
-
| p | A pair with the key and value to be checked. |
- Returns
- True if the key exists, false otherwise.
◆ Get() [1/2]
Get the reference of a key but don't create if it not exists.
- Parameters
-
- Returns
- JsonVal* if the key exists, std::nullopt otherwise.
◆ Get() [2/2]
Get the reference of a key but don't create if it not exists.
- Parameters
-
- Returns
- const JsonVal* if the key exists, std::nullopt otherwise.
◆ GetAndMove()
Copy of a value if it exists.
- Parameters
-
- Returns
- const JsonVal* if the key exists, std::nullopt otherwise.
◆ GetCopy()
Copy of a value if it exists.
- Parameters
-
- Returns
- const JsonVal* if the key exists, std::nullopt otherwise.
◆ GetCopyOrNull()
Copy of a value or return null if it not exists.
- Parameters
-
- Returns
- const JsonVal* if the key exists, NullV otherwise.
◆ GetOrNullAndMove()
Copy of a value or return null if it not exists.
- Parameters
-
- Returns
- const JsonVal* if the key exists, NullV otherwise.
◆ operator=() [1/3]
◆ operator=() [2/3]
◆ operator=() [3/3]
| JsonObject & Thoth::NJson::JsonObject::operator= |
( |
std::initializer_list< JsonPair > |
list | ) |
|
◆ operator==()
| bool Thoth::NJson::JsonObject::operator== |
( |
const JsonObject & |
other | ) |
const |
- Returns
- True if both jsons match.
◆ operator[]() [1/2]
- Returns
- The JsonVal& associated with a key. Create if it not exists. STL containers has many problems so it must be JsonKey.
◆ operator[]() [2/2]
- Returns
- The const JsonVal& associated with a key or returns a null reference if it not exists. STL containers has many problems so it must be JsonKey.
◆ Remove()
◆ Set() [1/2]
same as Add(JsonPairRef p).
◆ Set() [2/2]
Add a value with the specified key. Replace if already exists.
- Parameters
-
| p | A pair with the key and the value to be added. |
◆ SetIfNull() [1/2]
◆ SetIfNull() [2/2]
| bool Thoth::NJson::JsonObject::SetIfNull |
( |
JsonPairRef |
p | ) |
|
If key not exists, set it to value.
- Parameters
-
| p | A pair with the key and the value to be added. |
- Returns
- True if the key not exists, false otherwise.
◆ Size()
| size_t Thoth::NJson::JsonObject::Size |
( |
| ) |
const |
- Returns
- The count of keys.
◆ Details::ReadObject
| bool Details::ReadObject |
( |
std::string_view & |
input, |
|
|
auto & |
val, |
|
|
const Details::BufferInfo & |
info |
|
) |
| |
|
friend |
◆ std::formatter< JsonObject >
◆ Json
| friend Thoth::NJson::JsonObject::Json |
The documentation for this struct was generated from the following file: