Insert into the JsonObject held by this object a Member constructed from the specified key and value if key does not already exist; otherwise, this method has no effect. Return a pair whose first member is an iterator referring to the (possibly newly inserted) Member object whose key matches, and whose second member is true if a new value was inserted, and false otherwise. If isNull(), then the type is changed to object. The (template parameter) type t_STRING_VIEW must be convertible to bsl::string_view. The behavior is undefined unless isObject() or isNull(), and unless key is valid UTF‐8 (see bdlde::Utf8Util::isValid).
Synopsis
Declared in <bdljsn_json.h>
template<
class t_VALUE,
class t_STRING_VIEW>
bsl::pair<JsonObject::Iterator, bool>
insert(
t_STRING_VIEW const& key,
t_VALUE&& value)
requires !bsl::is_integral <t_STRING_VIEW>::value
&& bsl::is_convertible<t_STRING_VIEW,
bsl::string_view>::value;
Created with MrDocs