BloombergLP::bdljsn::JsonObject::operator[]

Return a modifiable reference to the member associated with key.

Synopsis

Declared in <bdljsn_json.h>

Json&
operator[](std::string_view const& key);

Description

Return a reference providing modifiable access to the Json object associated with the specified key in this JsonObject; if this JsonObject does not already contain a Json object associated with key, first insert a new default-constructed Json object associated with key. The behavior is undefined unless key is valid UTF-8 (see bdlde::Utf8Util::isValid).

Return Value

modifiable reference to the member associated with key

Parameters

NameDescription
keyUTF-8 member name