JSON Pointer. More...
Public Member Functions | |
| json_pointer (const std::string &s="") | |
| create JSON pointer More... | |
| std::string | to_string () const noexcept |
| return a string representation of the JSON pointer More... | |
| operator std::string () const | |
| return a string representation of the JSON pointer More... | |
Friends | |
| template<template< typename, typename, typename... > class ObjectType, template< typename, typename... > class ArrayType, class StringType , class BooleanType , class NumberIntegerType , class NumberUnsignedType , class NumberFloatType , template< typename > class AllocatorType, template< typename, typename=void > class JSONSerializer> | |
| class | basic_json |
| allow basic_json to access private members More... | |
| bool | operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept |
| bool | operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept |
JSON Pointer.
A JSON pointer defines a string syntax for identifying a specific value within a JSON document. It can be used with functions at and operator[]. Furthermore, JSON pointers are the base for JSON patches.
|
inlineexplicit |
create JSON pointer
Create a JSON pointer according to the syntax described in Section 3 of RFC6901.
| [in] | s | string representing the JSON pointer; if omitted, the empty string is assumed which references the whole JSON value |
| parse_error.107 | if the given JSON pointer s is nonempty and does not begin with a slash (/); see example below |
| parse_error.108 | if a tilde (~) in the given JSON pointer s is not followed by 0 (representing ~) or 1 (representing /); see example below |
{The example shows the construction several valid JSON pointers as well as the exceptional behavior.,json_pointer}
|
inlinenoexcept |
return a string representation of the JSON pointer
ptr, it holds: {The example shows the result of to_string., json_pointer__to_string}
References nlohmann::detail::string.
|
inline |
return a string representation of the JSON pointer
ptr, it holds: {The example shows the result of to_string., json_pointer__to_string}
References nlohmann::detail::parse_error::create(), and nlohmann::detail::string.

|
friend |
allow basic_json to access private members