mirror of
https://github.com/nlohmann/json.git
synced 2026-10-01 13:34:14 +07:00
- API pages for operator[], at, front, back, find, contains, count, begin, end, cbegin, cend, items, and type_name of basic_json_view, linked both ways with the basic_json pages - the feature page and size() describe document order and duplicate keys - the examples show when the view helps: reading a few fields of a large text, probing optional members, and members in source order Signed-off-by: Niels Lohmann <mail@nlohmann.me>
828 B
828 B
nlohmann::basic_json::cbegin
const_iterator cbegin() const noexcept;
Returns an iterator to the first element.
Return value
iterator to the first element
Exception safety
No-throw guarantee: this member function never throws exceptions.
Complexity
Constant.
Examples
??? example
The following code shows an example for `cbegin()`.
```cpp
--8<-- "examples/cbegin.cpp"
```
Output:
```json
--8<-- "examples/cbegin.output"
```
See also
- cend - returns a const iterator to one past the last element
- basic_json_view::cbegin - the same iteration on a zero-copy view
Version history
- Added in version 1.0.0.