value::find_pointer

Access an element via JSON Pointer.

Synopsis

value const*
find_pointer(
    string_view ptr,
    boost::system::error_code& ec) const noexcept; (1)

value*
find_pointer(
    string_view ptr,
    boost::system::error_code& ec) noexcept; (2)

value const*
find_pointer(
    string_view ptr,
    std::error_code& ec) const noexcept; (3)

value*
find_pointer(
    string_view ptr,
    std::error_code& ec) noexcept; (4)

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 container.

Exception Safety

No-throw guarantee.

Return Value

pointer to the element identified by ptr.

Parameters

Name Description

ptr

JSON Pointer string.

ec

Set to the error, if any occurred.

See Also