[/ Copyright (c) 2022 Dmitry Arkhipov (grisumbras@yandex.ru) Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Official repository: https://github.com/boostorg/json ] [/-----------------------------------------------------------------------------] [section:nested_access Accessing Deeply Nested Elements] In order to allow conveniently retrieving and changing deeply nested elements of __value__ objects the library implements [@https://datatracker.ietf.org/doc/html/rfc6901 RFC 6901 (JSON Pointer)]: [snippet_pointer_1] This is particularly useful when throwing exceptions is undesirable. For example, compare [snippet_pointer_2] with [snippet_pointer_3] The library also allows changing and adding deeply nested elements. The function [link json.ref.boost__json__value.set_at_pointer `set_at_pointer`] traverses the value similarly to [link json.ref.boost__json__value.at_pointer `at_pointer`], but additionally, it can create missing elements in certain cases: [snippet_pointer_4] The specific behavior is controlled by an optional parameter of type [link json.ref.boost__json__set_pointer_options `set_pointer_options`]. For example, here's the same example with a different option: [snippet_pointer_5] [endsect]