JSON Pointer defines a string syntax for identifying a specific value within a JSON document. More...
Collaboration diagram for nlohmann::json_pointer< BasicJsonType >:Public Member Functions | |
| const std::string & | back () const |
| return last reference token More... | |
| bool | empty () const noexcept |
| return whether pointer points to the root document More... | |
| json_pointer (const std::string &s="") | |
| create JSON pointer More... | |
| operator std::string () const | |
| return a string representation of the JSON pointer More... | |
| json_pointer & | operator/= (const json_pointer &ptr) |
| append another JSON pointer at the end of this JSON pointer More... | |
| json_pointer & | operator/= (std::size_t array_idx) |
| append an array index at the end of this JSON pointer More... | |
| json_pointer & | operator/= (std::string token) |
| append an unescaped reference token at the end of this JSON pointer More... | |
| json_pointer | parent_pointer () const |
| returns the parent of this JSON pointer More... | |
| void | pop_back () |
| remove last reference token More... | |
| void | push_back (const std::string &token) |
| append an unescaped token at the end of the reference pointer More... | |
| void | push_back (std::string &&token) |
| append an unescaped token at the end of the reference pointer More... | |
| std::string | to_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 BinaryType > | |
| class | basic_json |
| bool | operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept |
| compares two JSON pointers for inequality More... | |
| json_pointer | operator/ (const json_pointer &lhs, const json_pointer &rhs) |
| create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer More... | |
| json_pointer | operator/ (const json_pointer &lhs, std::size_t array_idx) |
| create a new JSON pointer by appending the array-index-token at the end of the JSON pointer More... | |
| json_pointer | operator/ (const json_pointer &lhs, std::string token) |
| create a new JSON pointer by appending the unescaped token at the end of the JSON pointer More... | |
| bool | operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept |
| compares two JSON pointers for equality More... | |
JSON Pointer defines a string syntax for identifying a specific value within a JSON document.
|
explicit |
create JSON pointer
| const std::string & nlohmann::json_pointer< BasicJsonType >::back | ( | ) | const |
return last reference token
|
noexcept |
return whether pointer points to the root document
| nlohmann::json_pointer< BasicJsonType >::operator std::string | ( | ) | const |
return a string representation of the JSON pointer
| json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= | ( | const json_pointer< BasicJsonType > & | ptr | ) |
append another JSON pointer at the end of this JSON pointer
| json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= | ( | std::size_t | array_idx | ) |
append an array index at the end of this JSON pointer
| json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= | ( | std::string | token | ) |
append an unescaped reference token at the end of this JSON pointer
| json_pointer nlohmann::json_pointer< BasicJsonType >::parent_pointer | ( | ) | const |
returns the parent of this JSON pointer
| void nlohmann::json_pointer< BasicJsonType >::pop_back | ( | ) |
remove last reference token
| void nlohmann::json_pointer< BasicJsonType >::push_back | ( | const std::string & | token | ) |
append an unescaped token at the end of the reference pointer
| void nlohmann::json_pointer< BasicJsonType >::push_back | ( | std::string && | token | ) |
append an unescaped token at the end of the reference pointer
| std::string nlohmann::json_pointer< BasicJsonType >::to_string | ( | ) | const |
return a string representation of the JSON pointer
References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.
|
friend |
compares two JSON pointers for inequality
| [in] | lhs | JSON pointer to compare |
| [in] | rhs | JSON pointer to compare |
@complexity Linear in the length of the JSON pointer
@exceptionsafety No-throw guarantee: this function never throws exceptions.
|
friend |
create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer
|
friend |
create a new JSON pointer by appending the array-index-token at the end of the JSON pointer
|
friend |
create a new JSON pointer by appending the unescaped token at the end of the JSON pointer
|
friend |
compares two JSON pointers for equality
| [in] | lhs | JSON pointer to compare |
| [in] | rhs | JSON pointer to compare |
@complexity Linear in the length of the JSON pointer
@exceptionsafety No-throw guarantee: this function never throws exceptions.