BloombergLP::bdljsn::Json::Json

Constructors

Synopses

Declared in <bdljsn_json.h>

Create a Json object holding the JsonNull singleton.

Json();
» more...

Create a Json object by moving from the specified original.

Json(bslmf::MovableRef<Json> original);
» more...

Create a Json object holding JsonNull using basicAllocator.

explicit
Json(bslma::Allocator* basicAllocator);
» more...

Same as the related overload above for Json.

explicit
Json(
    bdldfp::Decimal64 value,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified boolean value.

explicit
Json(
    bool boolean,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    double value,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified numeric value.

explicit
Json(
    float value,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified numeric value.

explicit
Json(
    int value,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    long value,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    long long value,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified numeric value.

explicit
Json(
    unsigned int value,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    unsigned long value,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    unsigned long long value,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object having the same value as the specified original. Use the specified basicAllocator to supply memory.

Json(
    bslmf::MovableRef<Json> original,
    bslma::Allocator* basicAllocator);
» more...

Create a Json object by moving from the specified array.

Json(
    bslmf::MovableRef<JsonArray> array,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object by moving from the specified number.

explicit
Json(
    bslmf::MovableRef<JsonNumber> number,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

Json(
    bslmf::MovableRef<JsonObject> object,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object having the same value as original.

Json(
    Json const& original,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified array.

Json(
    JsonArray const& array,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the JsonNull value.

explicit
Json(
    JsonNull const& null,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified number.

explicit
Json(
    JsonNumber const& number,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

Json(
    JsonObject const& object,
    bslma::Allocator* basicAllocator = 0);
» more...

Same as the related overload above for Json.

explicit
Json(
    std::string_view const& string,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object holding the specified string.

explicit
Json(
    char const* string,
    bslma::Allocator* basicAllocator = 0);
» more...

Create a Json object by moving from the specified string.

template<class t_STRING_TYPE>
Json(
    BloombergLP::bslmf::MovableRef_Deduced<t_STRING_TYPE> string,
    bslma::Allocator* basicAllocator = 0)
requires bsl::is_same<t_STRING_TYPE,
                                bsl::string>::value;
» more...

Create a Json object from the specified initializer.

template<class t_JSON_INITIALIZER>
Json(
    t_JSON_INITIALIZER const& initializer,
    bslma::Allocator* basicAllocator = 0)
requires bsl::is_same<t_JSON_INITIALIZER,
                        Json_Initializer>::value;
» more...

Parameters

NameDescription
originalsource value
basicAllocatormemory allocator; null uses the default
valuenumeric value to store
booleanboolean value to store
arrayarray value to store
numbernumber value to store
objectobject value to store
nullnull value to store
stringUTF-8 string value to store
initializerlist-initialization value