AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
|
Json atom. More...
Json atom.
Public Types | |
using | Array = aui::impl::JsonArray |
using | Object = aui::impl::JsonObject |
Public Member Functions | |
AJson (std::initializer_list< std::pair< AString, AJson > > elems) | |
AJson (const char *name) | |
AJson (const AJson &json)=default | |
AJson (AJson &&) noexcept=default | |
AJson & | operator= (const AJson &)=default |
AJson & | operator= (AJson &&) noexcept=default |
bool | isInt () const noexcept |
bool | isLongInt () const noexcept |
bool | isEmpty () const noexcept |
bool | isNumber () const noexcept |
bool | isBool () const noexcept |
bool | isNull () const noexcept |
bool | isString () const noexcept |
bool | isArray () const noexcept |
bool | isObject () const noexcept |
int | asInt () const |
int64_t | asLongInt () const |
double | asNumber () const |
bool | asBool () const |
const AString & | asString () const |
const aui::impl::JsonArray & | asArray () const |
const aui::impl::JsonObject & | asObject () const |
aui::impl::JsonArray & | asArray () |
aui::impl::JsonObject & | asObject () |
bool | contains (const AString &mapKey) const |
AOptional< AJson > | containsOpt (const AString &mapKey) const |
AJson & | operator[] (const AString &mapKey) |
const AJson & | operator[] (const AString &mapKey) const |
AJson & | operator[] (int arrayIndex) |
const AJson & | operator[] (int arrayIndex) const |
void | push_back (AJson elem) |
API_AUI_JSON AJson | mergedWith (const AJson &other) |
Merges other json object into this object. More... | |
Static Public Member Functions | |
static API_AUI_JSON AString | toString (const AJson &json) |
static API_AUI_JSON AJson | fromString (const AString &json) |
static AJson | fromStream (aui::no_escape< IInputStream > stream) |
static API_AUI_JSON AJson | fromBuffer (AByteBufferView buffer) |
Merges other json object into this object.
Let's say this json is:
And other json is:
Then the result is:
#include <AUI/Json/AJson.h>