BloombergLP::bdljsn::Json::insert

Insert members from memberInitializers into the held object.

Synopsis

Declared in <bdljsn_json.h>

Json&
insert(std::initializer_list<JsonObject_MemberInitializer> memberInitializers);

Description

Insert into the JsonObject held by this object members created from the specified memberInitializers, ignoring those whose keys already exist. Return a non-const reference to this object. If isNull(), then the type is changed to object. The behavior is undefined unless isObject() or isNull(), and unless the keys of all members are valid UTF-8 (see bdlde::Utf8Util::isValid).

Return Value

a reference providing modifiable access to this object

Parameters

NameDescription
memberInitializersinitializer-list of members