BloombergLP::bdljsn::Json::operator[]

Return a modifiable reference to the held object's member for 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 the JsonObject held by this object. If isNull(), then type is changed to object. If the 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 isObject() or isNull().

Return Value

modifiable reference to the held object's member for key

Parameters

NameDescription
keyUTF-8 member name