Subscript operators

Synopses

Declared in <bdljsn_json.h>

Return a reference providing modifiable access to the element at the specified index in this JsonArray. The behavior is undefined unless index < size().

Json&
operator[](std::size_t index);

Return a reference providing non‐modifiable access to the element at the specified index in this JsonArray. The behavior is undefined unless index < size().

Json const&
operator[](std::size_t index) const;

Return Value

  • reference providing modifiable access to the element at the specified index in this JsonArray

  • a non‐modifiable reference to the element at the specified position

Parameters

Name

Description

index

zero‐based element position

Created with MrDocs