Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

value::at_pointer (3 of 3 overloads)
PrevUpHomeNext

Access an element via JSON Pointer.

Synopsis
value&
at_pointer(
    string_view ptr,
    boost::source_location const& loc = BOOST_CURRENT_LOCATION) &;
Description

This function is used to access a (potentially nested) element of the value using a JSON Pointer string.

Complexity

Linear in the sizes of ptr and underlying array, object, or string.

Exception Safety

Strong guarantee.

Parameters

Name

Description

ptr

JSON Pointer string.

loc

source_location to use in thrown exception; the source location of the call site by default.

Return Value

reference to the element identified by ptr.

Exceptions

Type

Thrown On

boost::system::system_error

if an error occurs.

See Also

RFC 6901 - JavaScript Object Notation (JSON) Pointer


PrevUpHomeNext