|
Access to the JSON value.
|
reference | at (size_type idx) |
| access specified array element with bounds checking
|
|
const_reference | at (size_type idx) const |
| access specified array element with bounds checking
|
|
reference | at (const typename object_t::key_type &key) |
| access specified object element with bounds checking
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
reference | at (KeyType &&key) |
| access specified object element with bounds checking
|
|
const_reference | at (const typename object_t::key_type &key) const |
| access specified object element with bounds checking
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
const_reference | at (KeyType &&key) const |
| access specified object element with bounds checking
|
|
reference | operator[] (size_type idx) |
| access specified array element
|
|
const_reference | operator[] (size_type idx) const |
| access specified array element
|
|
reference | operator[] (typename object_t::key_type key) |
| access specified object element
|
|
const_reference | operator[] (const typename object_t::key_type &key) const |
| access specified object element
|
|
template<typename T > |
reference | operator[] (T *key) |
|
template<typename T > |
const_reference | operator[] (T *key) const |
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
reference | operator[] (KeyType &&key) |
| access specified object element
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
const_reference | operator[] (KeyType &&key) const |
| access specified object element
|
|
template<class ValueType , detail::enable_if_t< !detail::is_transparent< object_comparator_t >::value &&detail::is_getable< basic_json_t, ValueType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ValueType | value (const typename object_t::key_type &key, const ValueType &default_value) const |
| access specified object element with default value
|
|
template<class ValueType , class ReturnType = typename value_return_type<ValueType>::type, detail::enable_if_t< !detail::is_transparent< object_comparator_t >::value &&detail::is_getable< basic_json_t, ReturnType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ReturnType | value (const typename object_t::key_type &key, ValueType &&default_value) const |
| access specified object element with default value
|
|
template<class ValueType , class KeyType , detail::enable_if_t< detail::is_transparent< object_comparator_t >::value &&!detail::is_json_pointer< KeyType >::value &&is_comparable_with_object_key< KeyType >::value &&detail::is_getable< basic_json_t, ValueType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ValueType | value (KeyType &&key, const ValueType &default_value) const |
| access specified object element with default value
|
|
template<class ValueType , class KeyType , class ReturnType = typename value_return_type<ValueType>::type, detail::enable_if_t< detail::is_transparent< object_comparator_t >::value &&!detail::is_json_pointer< KeyType >::value &&is_comparable_with_object_key< KeyType >::value &&detail::is_getable< basic_json_t, ReturnType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ReturnType | value (KeyType &&key, ValueType &&default_value) const |
| access specified object element via JSON Pointer with default value
|
|
template<class ValueType , detail::enable_if_t< detail::is_getable< basic_json_t, ValueType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ValueType | value (const json_pointer &ptr, const ValueType &default_value) const |
| access specified object element via JSON Pointer with default value
|
|
template<class ValueType , class ReturnType = typename value_return_type<ValueType>::type, detail::enable_if_t< detail::is_getable< basic_json_t, ReturnType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ReturnType | value (const json_pointer &ptr, ValueType &&default_value) const |
| access specified object element via JSON Pointer with default value
|
|
template<class ValueType , class BasicJsonType , detail::enable_if_t< detail::is_basic_json< BasicJsonType >::value &&detail::is_getable< basic_json_t, ValueType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ValueType | value (const ::nlohmann::json_pointer< BasicJsonType > &ptr, const ValueType &default_value) const |
|
template<class ValueType , class BasicJsonType , class ReturnType = typename value_return_type<ValueType>::type, detail::enable_if_t< detail::is_basic_json< BasicJsonType >::value &&detail::is_getable< basic_json_t, ReturnType >::value &&!std::is_same< value_t, detail::uncvref_t< ValueType > >::value, int > = 0> |
ReturnType | value (const ::nlohmann::json_pointer< BasicJsonType > &ptr, ValueType &&default_value) const |
|
reference | front () |
| access the first element
|
|
const_reference | front () const |
| access the first element
|
|
reference | back () |
| access the last element
|
|
const_reference | back () const |
| access the last element
|
|
template<class IteratorType , detail::enable_if_t< std::is_same< IteratorType, typename basic_json_t::iterator >::value||std::is_same< IteratorType, typename basic_json_t::const_iterator >::value, int > = 0> |
IteratorType | erase (IteratorType pos) |
| remove element given an iterator
|
|
template<class IteratorType , detail::enable_if_t< std::is_same< IteratorType, typename basic_json_t::iterator >::value||std::is_same< IteratorType, typename basic_json_t::const_iterator >::value, int > = 0> |
IteratorType | erase (IteratorType first, IteratorType last) |
| remove elements given an iterator range
|
|
size_type | erase (const typename object_t::key_type &key) |
| remove element from a JSON object given a key
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
size_type | erase (KeyType &&key) |
| remove element from a JSON object given a key
|
|
void | erase (const size_type idx) |
| remove element from a JSON array given an index
|
|
|
void | swap (reference left, reference right) noexcept(std::is_nothrow_move_constructible< value_t >::value &&std::is_nothrow_move_assignable< value_t >::value &&std::is_nothrow_move_constructible< json_value >::value &&//NOLINT(cppcoreguidelines-noexcept-swap, performance-noexcept-swap) std::is_nothrow_move_assignable< json_value >::value) |
| exchanges the values
|
|
void | clear () noexcept |
| clears the contents
|
|
void | push_back (basic_json &&val) |
| add an object to an array
|
|
reference | operator+= (basic_json &&val) |
| add an object to an array
|
|
void | push_back (const basic_json &val) |
| add an object to an array
|
|
reference | operator+= (const basic_json &val) |
| add an object to an array
|
|
void | push_back (const typename object_t::value_type &val) |
| add an object to an object
|
|
reference | operator+= (const typename object_t::value_type &val) |
| add an object to an object
|
|
void | push_back (initializer_list_t init) |
| add an object to an object
|
|
reference | operator+= (initializer_list_t init) |
| add an object to an object
|
|
template<class... Args> |
reference | emplace_back (Args &&... args) |
| add an object to an array
|
|
template<class... Args> |
std::pair< iterator, bool > | emplace (Args &&... args) |
| add an object to an object if key does not exist
|
|
template<typename... Args> |
iterator | insert_iterator (const_iterator pos, Args &&... args) |
|
iterator | insert (const_iterator pos, const basic_json &val) |
| inserts element into array
|
|
iterator | insert (const_iterator pos, basic_json &&val) |
| inserts element into array
|
|
iterator | insert (const_iterator pos, size_type cnt, const basic_json &val) |
| inserts copies of element into array
|
|
iterator | insert (const_iterator pos, const_iterator first, const_iterator last) |
| inserts range of elements into array
|
|
iterator | insert (const_iterator pos, initializer_list_t ilist) |
| inserts elements from initializer list into array
|
|
void | insert (const_iterator first, const_iterator last) |
| inserts range of elements into object
|
|
void | update (const_reference j, bool merge_objects=false) |
| updates a JSON object from another object, overwriting existing keys
|
|
void | update (const_iterator first, const_iterator last, bool merge_objects=false) |
| updates a JSON object from another object, overwriting existing keys
|
|
void | swap (reference other) noexcept(std::is_nothrow_move_constructible< value_t >::value &&std::is_nothrow_move_assignable< value_t >::value &&std::is_nothrow_move_constructible< json_value >::value &&//NOLINT(cppcoreguidelines-noexcept-swap, performance-noexcept-swap) std::is_nothrow_move_assignable< json_value >::value) |
| exchanges the values
|
|
void | swap (array_t &other) |
| exchanges the values
|
|
void | swap (object_t &other) |
| exchanges the values
|
|
void | swap (string_t &other) |
| exchanges the values
|
|
void | swap (binary_t &other) |
| exchanges the values
|
|
void | swap (typename binary_t::container_type &other) |
| exchanges the values
|
|
|
Direct access to the stored value of a JSON value.
|
template<typename PointerType , typename std::enable_if< std::is_pointer< PointerType >::value, int >::type = 0> |
auto | get_ptr () noexcept -> decltype(std::declval< basic_json_t & >().get_impl_ptr(std::declval< PointerType >())) |
| get a pointer value (implicit)
|
|
template<typename PointerType , typename std::enable_if< std::is_pointer< PointerType >::value &&std::is_const< typename std::remove_pointer< PointerType >::type >::value, int >::type = 0> |
constexpr auto | get_ptr () const noexcept -> decltype(std::declval< const basic_json_t & >().get_impl_ptr(std::declval< PointerType >())) |
| get a pointer value (implicit)
|
|
template<typename ValueTypeCV , typename ValueType = detail::uncvref_t<ValueTypeCV>> |
auto | get () const noexcept(noexcept(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {}))) -> decltype(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {})) |
| get a (pointer) value (explicit)
|
|
template<typename PointerType , typename std::enable_if< std::is_pointer< PointerType >::value, int >::type = 0> |
auto | get () noexcept -> decltype(std::declval< basic_json_t & >().template get_ptr< PointerType >()) |
| get a pointer value (explicit)
|
|
template<typename ValueType , detail::enable_if_t< !detail::is_basic_json< ValueType >::value &&detail::has_from_json< basic_json_t, ValueType >::value, int > = 0> |
ValueType & | get_to (ValueType &v) const noexcept(noexcept(JSONSerializer< ValueType >::from_json(std::declval< const basic_json_t & >(), v))) |
| get a value (explicit)
|
|
template<typename ValueType , detail::enable_if_t< detail::is_basic_json< ValueType >::value, int > = 0> |
ValueType & | get_to (ValueType &v) const |
|
template<typename T , std::size_t N, typename Array = T (&)[N], detail::enable_if_t< detail::has_from_json< basic_json_t, Array >::value, int > = 0> |
Array | get_to (T(&v)[N]) const noexcept(noexcept(JSONSerializer< Array >::from_json(std::declval< const basic_json_t & >(), v))) |
|
template<typename ReferenceType , typename std::enable_if< std::is_reference< ReferenceType >::value, int >::type = 0> |
ReferenceType | get_ref () |
| get a reference value (implicit)
|
|
template<typename ReferenceType , typename std::enable_if< std::is_reference< ReferenceType >::value &&std::is_const< typename std::remove_reference< ReferenceType >::type >::value, int >::type = 0> |
ReferenceType | get_ref () const |
| get a reference value (implicit)
|
|
template<typename ValueType , typename std::enable_if< detail::conjunction< detail::negation< std::is_pointer< ValueType > >, detail::negation< std::is_same< ValueType, std::nullptr_t > >, detail::negation< std::is_same< ValueType, detail::json_ref< basic_json > > >, detail::negation< std::is_same< ValueType, typename string_t::value_type > >, detail::negation< detail::is_basic_json< ValueType > >, detail::negation< std::is_same< ValueType, std::initializer_list< typename string_t::value_type > > >, detail::is_detected_lazy< detail::get_template_function, const basic_json_t &, ValueType > >::value, int >::type = 0> |
JSON_EXPLICIT | operator ValueType () const |
| get a value (implicit)
|
|
binary_t & | get_binary () |
| get a binary value
|
|
const binary_t & | get_binary () const |
| get a binary value
|
|
|
Constructors of class basic_json, copy/move constructor, copy assignment, static functions creating objects, and the destructor.
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | binary (const typename binary_t::container_type &init) |
| explicitly create a binary array (without subtype)
|
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | binary (const typename binary_t::container_type &init, typename binary_t::subtype_type subtype) |
| explicitly create a binary array (with subtype)
|
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | binary (typename binary_t::container_type &&init) |
| explicitly create a binary array
|
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | binary (typename binary_t::container_type &&init, typename binary_t::subtype_type subtype) |
| explicitly create a binary array (with subtype)
|
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | array (initializer_list_t init={}) |
| explicitly create an array from an initializer list
|
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | object (initializer_list_t init={}) |
| explicitly create an object from an initializer list
|
|
| basic_json (const value_t v) |
| create an empty value with a given type
|
|
| basic_json (std::nullptr_t=nullptr) noexcept |
| create a null object
|
|
template<typename CompatibleType , typename U = detail::uncvref_t<CompatibleType>, detail::enable_if_t< !detail::is_basic_json< U >::value &&detail::is_compatible_type< basic_json_t, U >::value, int > = 0> |
| basic_json (CompatibleType &&val) noexcept(noexcept(//NOLINT(bugprone-forwarding-reference-overload, bugprone-exception-escape) JSONSerializer< U >::to_json(std::declval< basic_json_t & >(), std::forward< CompatibleType >(val)))) |
| create a JSON value from compatible types
|
|
template<typename BasicJsonType , detail::enable_if_t< detail::is_basic_json< BasicJsonType >::value &&!std::is_same< basic_json, BasicJsonType >::value, int > = 0> |
| basic_json (const BasicJsonType &val) |
| create a JSON value from an existing one
|
|
| basic_json (initializer_list_t init, bool type_deduction=true, value_t manual_type=value_t::array) |
| create a container (array or object) from an initializer list
|
|
| basic_json (size_type cnt, const basic_json &val) |
| construct an array with count copies of given value
|
|
template<class InputIT , typename std::enable_if< std::is_same< InputIT, typename basic_json_t::iterator >::value||std::is_same< InputIT, typename basic_json_t::const_iterator >::value, int >::type = 0> |
| basic_json (InputIT first, InputIT last) |
| construct a JSON container given an iterator range
|
|
template<typename JsonRef , detail::enable_if_t< detail::conjunction< detail::is_json_ref< JsonRef >, std::is_same< typename JsonRef::value_type, basic_json > >::value, int > = 0> |
| basic_json (const JsonRef &ref) |
|
| basic_json (const basic_json &other) |
| copy constructor
|
|
| basic_json (basic_json &&other) noexcept |
| move constructor
|
|
basic_json & | operator= (basic_json other) noexcept(std::is_nothrow_move_constructible< value_t >::value &&std::is_nothrow_move_assignable< value_t >::value &&std::is_nothrow_move_constructible< json_value >::value &&std::is_nothrow_move_assignable< json_value >::value &&std::is_nothrow_move_assignable< json_base_class_t >::value) |
| copy assignment
|
|
| ~basic_json () noexcept |
| destructor
|
|
|
static std::vector< std::uint8_t > | to_cbor (const basic_json &j) |
| create a CBOR serialization of a given JSON value
|
|
static void | to_cbor (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a CBOR serialization of a given JSON value
|
|
static void | to_cbor (const basic_json &j, detail::output_adapter< char > o) |
| create a CBOR serialization of a given JSON value
|
|
static std::vector< std::uint8_t > | to_msgpack (const basic_json &j) |
| create a MessagePack serialization of a given JSON value
|
|
static void | to_msgpack (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a MessagePack serialization of a given JSON value
|
|
static void | to_msgpack (const basic_json &j, detail::output_adapter< char > o) |
| create a MessagePack serialization of a given JSON value
|
|
static std::vector< std::uint8_t > | to_ubjson (const basic_json &j, const bool use_size=false, const bool use_type=false) |
| create a UBJSON serialization of a given JSON value
|
|
static void | to_ubjson (const basic_json &j, detail::output_adapter< std::uint8_t > o, const bool use_size=false, const bool use_type=false) |
| create a UBJSON serialization of a given JSON value
|
|
static void | to_ubjson (const basic_json &j, detail::output_adapter< char > o, const bool use_size=false, const bool use_type=false) |
| create a UBJSON serialization of a given JSON value
|
|
static std::vector< std::uint8_t > | to_bjdata (const basic_json &j, const bool use_size=false, const bool use_type=false) |
| create a BJData serialization of a given JSON value
|
|
static void | to_bjdata (const basic_json &j, detail::output_adapter< std::uint8_t > o, const bool use_size=false, const bool use_type=false) |
| create a BJData serialization of a given JSON value
|
|
static void | to_bjdata (const basic_json &j, detail::output_adapter< char > o, const bool use_size=false, const bool use_type=false) |
| create a BJData serialization of a given JSON value
|
|
static std::vector< std::uint8_t > | to_bson (const basic_json &j) |
| create a BSON serialization of a given JSON value
|
|
static void | to_bson (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a BSON serialization of a given JSON value
|
|
static void | to_bson (const basic_json &j, detail::output_adapter< char > o) |
| create a BSON serialization of a given JSON value
|
|
template<typename InputType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_cbor (InputType &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error) |
| create a JSON value from an input in CBOR format
|
|
template<typename IteratorType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_cbor (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error) |
| create a JSON value from an input in CBOR format
|
|
template<typename T > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_cbor (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error) |
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_cbor (detail::span_input_adapter &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error) |
|
template<typename InputType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_msgpack (InputType &&i, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in MessagePack format
|
|
template<typename IteratorType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_msgpack (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in MessagePack format
|
|
template<typename T > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_msgpack (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true) |
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_msgpack (detail::span_input_adapter &&i, const bool strict=true, const bool allow_exceptions=true) |
|
template<typename InputType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_ubjson (InputType &&i, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in UBJSON format
|
|
template<typename IteratorType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_ubjson (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in UBJSON format
|
|
template<typename T > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_ubjson (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true) |
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_ubjson (detail::span_input_adapter &&i, const bool strict=true, const bool allow_exceptions=true) |
|
template<typename InputType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bjdata (InputType &&i, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in BJData format
|
|
template<typename IteratorType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bjdata (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in BJData format
|
|
template<typename InputType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bson (InputType &&i, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in BSON format
|
|
template<typename IteratorType > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bson (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true) |
| create a JSON value from an input in BSON format
|
|
template<typename T > |
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bson (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true) |
|
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json | from_bson (detail::span_input_adapter &&i, const bool strict=true, const bool allow_exceptions=true) |
|
|
Functions to inspect the type of a JSON value.
|
string_t | dump (const int indent=-1, const char indent_char=' ', const bool ensure_ascii=false, const error_handler_t error_handler=error_handler_t::strict) const |
| serialization
|
|
constexpr value_t | type () const noexcept |
| return the type of the JSON value (explicit)
|
|
constexpr bool | is_primitive () const noexcept |
| return whether type is primitive
|
|
constexpr bool | is_structured () const noexcept |
| return whether type is structured
|
|
constexpr bool | is_null () const noexcept |
| return whether value is null
|
|
constexpr bool | is_boolean () const noexcept |
| return whether value is a boolean
|
|
constexpr bool | is_number () const noexcept |
| return whether value is a number
|
|
constexpr bool | is_number_integer () const noexcept |
| return whether value is an integer number
|
|
constexpr bool | is_number_unsigned () const noexcept |
| return whether value is an unsigned integer number
|
|
constexpr bool | is_number_float () const noexcept |
| return whether value is a floating-point number
|
|
constexpr bool | is_object () const noexcept |
| return whether value is an object
|
|
constexpr bool | is_array () const noexcept |
| return whether value is an array
|
|
constexpr bool | is_string () const noexcept |
| return whether value is a string
|
|
constexpr bool | is_binary () const noexcept |
| return whether value is a binary array
|
|
constexpr bool | is_discarded () const noexcept |
| return whether value is discarded
|
|
constexpr | operator value_t () const noexcept |
| return the type of the JSON value (implicit)
|
|
|
iterator | find (const typename object_t::key_type &key) |
| find an element in a JSON object
|
|
const_iterator | find (const typename object_t::key_type &key) const |
| find an element in a JSON object
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
iterator | find (KeyType &&key) |
| find an element in a JSON object
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
const_iterator | find (KeyType &&key) const |
| find an element in a JSON object
|
|
size_type | count (const typename object_t::key_type &key) const |
| returns the number of occurrences of a key in a JSON object
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
size_type | count (KeyType &&key) const |
| returns the number of occurrences of a key in a JSON object
|
|
bool | contains (const typename object_t::key_type &key) const |
| check the existence of an element in a JSON object
|
|
template<class KeyType , detail::enable_if_t< detail::is_usable_as_basic_json_key_type< basic_json_t, KeyType >::value, int > = 0> |
bool | contains (KeyType &&key) const |
| check the existence of an element in a JSON object
|
|
bool | contains (const json_pointer &ptr) const |
| check the existence of an element in a JSON object given a JSON pointer
|
|
template<typename BasicJsonType , detail::enable_if_t< detail::is_basic_json< BasicJsonType >::value, int > = 0> |
bool | contains (const typename ::nlohmann::json_pointer< BasicJsonType > &ptr) const |
|
template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>, class CustomBaseClass = void>
class basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass >
namespace for Niels Lohmann
a class to store JSON values
- See also
- https://json.nlohmann.me/api/basic_json/
-
https://github.com/nlohmann
- Since
- version 1.0.0
a class to store JSON values
- Since
- version 1.0.0