BloombergLP::bdljsn::JsonObject::JsonObject

Create a JsonObject from the specified memberInitializers.

Synopsis

Declared in <bdljsn_json.h>

JsonObject(
    std::initializer_list<JsonObject_MemberInitializer> memberInitializers,
    bslma::Allocator* basicAllocator = 0);

Description

Create a JsonObject having members created (in order) from the specified memberInitializers. Member initializers having key values that were previously inserted into the new object are ignored. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used. The behavior is undefined unless the key of each member initializer in memberInitializers is valid UTF-8 (see bdlde::Utf8Util::isValid).

Parameters

NameDescription
memberInitializersinitializer-list of members
basicAllocatormemory allocator; null uses the default