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

Subscript operators

Synopses

Declared in <bdljsn_json.h>

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).

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

Return a reference providing non-modifiable access to the Json object associated with the specified key in this JsonObject. The behavior is undefined unless key is valid UTF-8 (see bdlde::Utf8Util::isValid) and this JsonObject already contains a Json object associated with key.

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