BloombergLP::bdljsn::Json::insert

Insert members from [first, last)] into the held object.

Synopsis

Declared in <bdljsn_json.h>

template<class t_INPUT_ITERATOR>
Json&
insert(
    t_INPUT_ITERATOR first,
    t_INPUT_ITERATOR last)
requires !bsl::is_convertible<t_INPUT_ITERATOR,
                                                 bsl::string_view>::value;

Description

Insert into the JsonObject held by this object each Member in the range [first, last)] whose key is not already present. 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(), first and last refer to a valid sequence, and 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
firstbeginning of the source range
lastend of the source range