|
JSON for Modern C++
3.9.1
|
JSON Pointer. More...
#include <json.hpp>
Public Member Functions | |
| json_pointer (const std::string &s="") | |
| create JSON pointer More... | |
| const std::string & | back () const |
| return last reference token More... | |
| bool | empty () const noexcept |
| return whether pointer points to the root document 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 | |
| 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 &ptr, 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 &ptr, 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... | |
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.