BmnRoot
Loading...
Searching...
No Matches
nlohmann::json_pointer< BasicJsonType > Class Template Reference

JSON Pointer defines a string syntax for identifying a specific value within a JSON document. More...

#include <json.hpp>

Public Member Functions

 json_pointer (const std::string &s="")
 create JSON pointer
 
std::string to_string () const
 return a string representation of the JSON pointer
 
 operator std::string () const
 return a string representation of the JSON pointer
 
json_pointeroperator/= (const json_pointer &ptr)
 append another JSON pointer at the end of this JSON pointer
 
json_pointeroperator/= (std::string token)
 append an unescaped reference token at the end of this JSON pointer
 
json_pointeroperator/= (std::size_t array_idx)
 append an array index at the end of this JSON pointer
 
json_pointer parent_pointer () const
 returns the parent of this JSON pointer
 
void pop_back ()
 remove last reference token
 
const std::string & back () const
 return last reference token
 
void push_back (const std::string &token)
 append an unescaped token at the end of the reference pointer
 
void push_back (std::string &&token)
 append an unescaped token at the end of the reference pointer
 
bool empty () const noexcept
 return whether pointer points to the root document
 
 json_pointer (const std::string &s="")
 create JSON pointer
 
std::string to_string () const
 return a string representation of the JSON pointer
 
 operator std::string () const
 return a string representation of the JSON pointer
 
json_pointeroperator/= (const json_pointer &ptr)
 append another JSON pointer at the end of this JSON pointer
 
json_pointeroperator/= (std::string token)
 append an unescaped reference token at the end of this JSON pointer
 
json_pointeroperator/= (std::size_t array_idx)
 append an array index at the end of this JSON pointer
 
json_pointer parent_pointer () const
 returns the parent of this JSON pointer
 
void pop_back ()
 remove last reference token
 
const std::string & back () const
 return last reference token
 
void push_back (const std::string &token)
 append an unescaped token at the end of the reference pointer
 
void push_back (std::string &&token)
 append an unescaped token at the end of the reference pointer
 
bool empty () const noexcept
 return whether pointer points to the root document
 
 json_pointer (const std::string &s="")
 create JSON pointer
 
std::string to_string () const
 return a string representation of the JSON pointer
 
 operator std::string () const
 return a string representation of the JSON pointer
 
json_pointeroperator/= (const json_pointer &ptr)
 append another JSON pointer at the end of this JSON pointer
 
json_pointeroperator/= (std::string token)
 append an unescaped reference token at the end of this JSON pointer
 
json_pointeroperator/= (std::size_t array_idx)
 append an array index at the end of this JSON pointer
 
json_pointer parent_pointer () const
 returns the parent of this JSON pointer
 
void pop_back ()
 remove last reference token
 
const std::string & back () const
 return last reference token
 
void push_back (const std::string &token)
 append an unescaped token at the end of the reference pointer
 
void push_back (std::string &&token)
 append an unescaped token at the end of the reference pointer
 
bool empty () const noexcept
 return whether pointer points to the root document
 

Friends

class basic_json
 
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
 
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
 
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
 
bool operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for equality
 
bool operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for inequality
 
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
 
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
 
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
 
bool operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for equality
 
bool operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for inequality
 
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
 
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
 
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
 
bool operator== (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for equality
 
bool operator!= (json_pointer const &lhs, json_pointer const &rhs) noexcept
 compares two JSON pointers for inequality
 

Detailed Description

template<typename BasicJsonType>
class nlohmann::json_pointer< BasicJsonType >

JSON Pointer defines a string syntax for identifying a specific value within a JSON document.

See also
https://json.nlohmann.me/api/json_pointer/

Definition at line 12259 of file json.hpp.

Constructor & Destructor Documentation

◆ json_pointer() [1/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::json_pointer ( const std::string &  s = "")
inlineexplicit

create JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/json_pointer/

Definition at line 12268 of file json.hpp.

◆ json_pointer() [2/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::json_pointer ( const std::string &  s = "")
inlineexplicit

create JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/json_pointer/

Definition at line 12268 of file json.hpp.

◆ json_pointer() [3/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::json_pointer ( const std::string &  s = "")
inlineexplicit

create JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/json_pointer/

Definition at line 12268 of file json.hpp.

Member Function Documentation

◆ back() [1/3]

◆ back() [2/3]

template<typename BasicJsonType >
const std::string & nlohmann::json_pointer< BasicJsonType >::back ( ) const
inline

◆ back() [3/3]

template<typename BasicJsonType >
const std::string & nlohmann::json_pointer< BasicJsonType >::back ( ) const
inline

◆ empty() [1/3]

◆ empty() [2/3]

template<typename BasicJsonType >
bool nlohmann::json_pointer< BasicJsonType >::empty ( ) const
inlinenoexcept

return whether pointer points to the root document

See also
https://json.nlohmann.me/api/json_pointer/empty/

Definition at line 12392 of file json.hpp.

◆ empty() [3/3]

template<typename BasicJsonType >
bool nlohmann::json_pointer< BasicJsonType >::empty ( ) const
inlinenoexcept

return whether pointer points to the root document

See also
https://json.nlohmann.me/api/json_pointer/empty/

Definition at line 12392 of file json.hpp.

◆ operator std::string() [1/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::operator std::string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_string/

Definition at line 12286 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::to_string().

◆ operator std::string() [2/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::operator std::string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_string/

Definition at line 12286 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::to_string().

◆ operator std::string() [3/3]

template<typename BasicJsonType >
nlohmann::json_pointer< BasicJsonType >::operator std::string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_string/

Definition at line 12286 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::to_string().

◆ operator/=() [1/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( const json_pointer< BasicJsonType > &  ptr)
inline

append another JSON pointer at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12293 of file json.hpp.

◆ operator/=() [2/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( const json_pointer< BasicJsonType > &  ptr)
inline

append another JSON pointer at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12293 of file json.hpp.

◆ operator/=() [3/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( const json_pointer< BasicJsonType > &  ptr)
inline

append another JSON pointer at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12293 of file json.hpp.

◆ operator/=() [4/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::size_t  array_idx)
inline

append an array index at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12311 of file json.hpp.

◆ operator/=() [5/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::size_t  array_idx)
inline

append an array index at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12311 of file json.hpp.

◆ operator/=() [6/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::size_t  array_idx)
inline

append an array index at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12311 of file json.hpp.

◆ operator/=() [7/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::string  token)
inline

append an unescaped reference token at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12303 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::push_back().

◆ operator/=() [8/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::string  token)
inline

append an unescaped reference token at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12303 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::push_back().

◆ operator/=() [9/9]

template<typename BasicJsonType >
json_pointer & nlohmann::json_pointer< BasicJsonType >::operator/= ( std::string  token)
inline

append an unescaped reference token at the end of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slasheq/

Definition at line 12303 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::push_back().

◆ parent_pointer() [1/3]

template<typename BasicJsonType >
json_pointer nlohmann::json_pointer< BasicJsonType >::parent_pointer ( ) const
inline

returns the parent of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/parent_pointer/

Definition at line 12340 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::empty().

◆ parent_pointer() [2/3]

template<typename BasicJsonType >
json_pointer nlohmann::json_pointer< BasicJsonType >::parent_pointer ( ) const
inline

returns the parent of this JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/parent_pointer/

Definition at line 12340 of file json.hpp.

References nlohmann::json_pointer< BasicJsonType >::empty().

◆ parent_pointer() [3/3]

template<typename BasicJsonType >
json_pointer nlohmann::json_pointer< BasicJsonType >::parent_pointer ( ) const
inline

◆ pop_back() [1/3]

◆ pop_back() [2/3]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::pop_back ( )
inline

◆ pop_back() [3/3]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::pop_back ( )
inline

◆ push_back() [1/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( const std::string &  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12378 of file json.hpp.

Referenced by nlohmann::json_pointer< BasicJsonType >::operator/=().

◆ push_back() [2/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( const std::string &  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12378 of file json.hpp.

◆ push_back() [3/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( const std::string &  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12378 of file json.hpp.

◆ push_back() [4/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( std::string &&  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12385 of file json.hpp.

◆ push_back() [5/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( std::string &&  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12385 of file json.hpp.

◆ push_back() [6/6]

template<typename BasicJsonType >
void nlohmann::json_pointer< BasicJsonType >::push_back ( std::string &&  token)
inline

append an unescaped token at the end of the reference pointer

See also
https://json.nlohmann.me/api/json_pointer/push_back/

Definition at line 12385 of file json.hpp.

◆ to_string() [1/3]

template<typename BasicJsonType >
std::string nlohmann::json_pointer< BasicJsonType >::to_string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/to_string/

Definition at line 12274 of file json.hpp.

Referenced by nlohmann::json_pointer< BasicJsonType >::operator std::string().

◆ to_string() [2/3]

template<typename BasicJsonType >
std::string nlohmann::json_pointer< BasicJsonType >::to_string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/to_string/

Definition at line 12274 of file json.hpp.

◆ to_string() [3/3]

template<typename BasicJsonType >
std::string nlohmann::json_pointer< BasicJsonType >::to_string ( ) const
inline

return a string representation of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/to_string/

Definition at line 12274 of file json.hpp.

Friends And Related Symbol Documentation

◆ basic_json

template<typename BasicJsonType >
basic_json
friend

Definition at line 12263 of file json.hpp.

◆ operator!= [1/3]

template<typename BasicJsonType >
bool operator!= ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for inequality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is not equal rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13054 of file json.hpp.

◆ operator!= [2/3]

template<typename BasicJsonType >
bool operator!= ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for inequality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is not equal rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13054 of file json.hpp.

◆ operator!= [3/3]

template<typename BasicJsonType >
bool operator!= ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for inequality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is not equal rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13054 of file json.hpp.

◆ operator/ [1/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
const json_pointer< BasicJsonType > &  rhs 
)
friend

create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12318 of file json.hpp.

◆ operator/ [2/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
const json_pointer< BasicJsonType > &  rhs 
)
friend

create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12318 of file json.hpp.

◆ operator/ [3/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
const json_pointer< BasicJsonType > &  rhs 
)
friend

create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12318 of file json.hpp.

◆ operator/ [4/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::size_t  array_idx 
)
friend

create a new JSON pointer by appending the array-index-token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12333 of file json.hpp.

◆ operator/ [5/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::size_t  array_idx 
)
friend

create a new JSON pointer by appending the array-index-token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12333 of file json.hpp.

◆ operator/ [6/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::size_t  array_idx 
)
friend

create a new JSON pointer by appending the array-index-token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12333 of file json.hpp.

◆ operator/ [7/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::string  token 
)
friend

create a new JSON pointer by appending the unescaped token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12326 of file json.hpp.

◆ operator/ [8/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::string  token 
)
friend

create a new JSON pointer by appending the unescaped token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12326 of file json.hpp.

◆ operator/ [9/9]

template<typename BasicJsonType >
json_pointer operator/ ( const json_pointer< BasicJsonType > &  lhs,
std::string  token 
)
friend

create a new JSON pointer by appending the unescaped token at the end of the JSON pointer

See also
https://json.nlohmann.me/api/json_pointer/operator_slash/

Definition at line 12326 of file json.hpp.

◆ operator== [1/3]

template<typename BasicJsonType >
bool operator== ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for equality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is equal to rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13037 of file json.hpp.

◆ operator== [2/3]

template<typename BasicJsonType >
bool operator== ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for equality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is equal to rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13037 of file json.hpp.

◆ operator== [3/3]

template<typename BasicJsonType >
bool operator== ( json_pointer< BasicJsonType > const &  lhs,
json_pointer< BasicJsonType > const &  rhs 
)
friend

compares two JSON pointers for equality

Parameters
[in]lhsJSON pointer to compare
[in]rhsJSON pointer to compare
Returns
whether lhs is equal to rhs

@complexity Linear in the length of the JSON pointer

@exceptionsafety No-throw guarantee: this function never throws exceptions.

Definition at line 13037 of file json.hpp.


The documentation for this class was generated from the following files: