value::try_at_pointer

## `value::try_at_pointer`

Access an element via JSON Pointer.

### Synopsis

    boost::system::result< value const & >
    try_at_pointer(
        string_view ptr) const noexcept; (1)

    boost::system::result< value & >
    try_at_pointer(
        string_view ptr) noexcept; (2)

### 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

No-throw guarantee.

### Return Value

`boost::system::result` containing either a reference to the element identified by `ptr` or a corresponding `error_code`.

### Parameters

Name | Description
--- | ---
`ptr` | JSON Pointer string.

### See Also

RFC 6901 - JavaScript Object Notation (JSON) Pointer.

Edit this page