BloombergLP::bdljsn::Json::pushBack

Append a copy of number to the held array.

Synopsis

Declared in <bdljsn_json.h>

Json&
pushBack(JsonNumber const& number);

Description

Append to the end of this Json object's array a copy of the specified number and return a non-const reference to this object. If isNull(), then the type is changed to array. If an exception is thrown, *this is unaffected. Throw bsl::length_error if size() == maxSize(). The behavior is undefined unless isArray() or isNull().

Return Value

a reference providing modifiable access to this object

Parameters

NameDescription
numbervalue to append