a class to store JSON values More...
Collaboration diagram for nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >:Public Types | |
| using | cbor_tag_handler_t = detail::cbor_tag_handler_t |
| how to treat CBOR tags | |
| using | error_handler_t = detail::error_handler_t |
| how to treat decoding errors | |
| using | initializer_list_t = std::initializer_list< detail::json_ref< basic_json > > |
| helper type for initializer lists of basic_json values | |
| using | input_format_t = detail::input_format_t |
| using | json_pointer = ::nlohmann::json_pointer< basic_json > |
| JSON Pointer, see nlohmann::json_pointer. | |
| using | json_sax_t = json_sax< basic_json > |
| SAX interface type, see nlohmann::json_sax. | |
| template<typename T , typename SFINAE > | |
| using | json_serializer = JSONSerializer< T, SFINAE > |
| using | parse_event_t = detail::parse_event_t |
| parser event types More... | |
| using | parser_callback_t = detail::parser_callback_t< basic_json > |
| per-element parser callback type More... | |
| using | value_t = detail::value_t |
Public Member Functions | |
| __attribute__ ((__warn_unused_result__)) static basic_json meta() | |
| returns version information on the library More... | |
Static Public Member Functions | |
| static allocator_type | get_allocator () |
| returns the allocator associated with the container More... | |
| static ThisType ReferenceType | get_ref_impl (ThisType &obj) |
Public Attributes | |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX IteratorType SAX input_format_t const bool const bool | ignore_comments |
| json_value | m_value = {} |
| the value of the current element | |
Friends | |
| template<typename BasicJsonType , typename InputType , typename SAX > | |
| class | ::nlohmann::detail::binary_reader |
| template<typename BasicJsonType , typename CharType > | |
| class | ::nlohmann::detail::binary_writer |
| class | ::nlohmann::detail::exception |
| template<typename BasicJsonType > | |
| class | ::nlohmann::detail::iter_impl |
| template<typename BasicJsonType > | |
| class | ::nlohmann::detail::json_sax_dom_callback_parser |
| template<typename BasicJsonType > | |
| class | ::nlohmann::detail::json_sax_dom_parser |
| template<typename BasicJsonType , typename InputType > | |
| class | ::nlohmann::detail::parser |
| template<detail::value_t > | |
| struct | detail::external_constructor |
exceptions | |
| using | exception = detail::exception |
| using | parse_error = detail::parse_error |
| using | invalid_iterator = detail::invalid_iterator |
| using | type_error = detail::type_error |
| using | out_of_range = detail::out_of_range |
| using | other_error = detail::other_error |
container types | |
The canonic container types to use basic_json like any other STL container. | |
| using | value_type = basic_json |
| the type of elements in a basic_json container | |
| using | reference = value_type & |
| the type of an element reference | |
| using | const_reference = const value_type & |
| the type of an element const reference | |
| using | difference_type = std::ptrdiff_t |
| a type to represent differences between iterators | |
| using | size_type = std::size_t |
| a type to represent container sizes | |
| using | allocator_type = AllocatorType< basic_json > |
| the allocator type | |
| using | pointer = typename std::allocator_traits< allocator_type >::pointer |
| the type of an element pointer | |
| using | const_pointer = typename std::allocator_traits< allocator_type >::const_pointer |
| the type of an element const pointer | |
| using | iterator = iter_impl< basic_json > |
| an iterator for a basic_json container | |
| using | const_iterator = iter_impl< const basic_json > |
| a const iterator for a basic_json container | |
| using | reverse_iterator = json_reverse_iterator< typename basic_json::iterator > |
| a reverse iterator for a basic_json container | |
| using | const_reverse_iterator = json_reverse_iterator< typename basic_json::const_iterator > |
| a const reverse iterator for a basic_json container | |
JSON value data types | |
The data types to store a JSON value. These types are derived from the template arguments passed to class basic_json. | |
| using | object_comparator_t = std::less<> |
| object key comparator type More... | |
| using | object_t = ObjectType< StringType, basic_json, object_comparator_t, AllocatorType< std::pair< const StringType, basic_json > > > |
| a type for an object More... | |
| using | array_t = ArrayType< basic_json, AllocatorType< basic_json > > |
| a type for an array More... | |
| using | string_t = StringType |
| a type for a string More... | |
| using | boolean_t = BooleanType |
| a type for a boolean More... | |
| using | number_integer_t = NumberIntegerType |
| a type for a number (integer) More... | |
| using | number_unsigned_t = NumberUnsignedType |
| a type for a number (unsigned) More... | |
| using | number_float_t = NumberFloatType |
| a type for a number (floating-point) More... | |
| using | binary_t = nlohmann::byte_container_with_subtype< BinaryType > |
| a type for a packed binary type More... | |
modifiers | |
| 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 &&std::is_nothrow_move_assignable< json_value >::value) |
| exchanges the values More... | |
| void | clear () noexcept |
| clears the contents More... | |
| void | push_back (basic_json &&val) |
| add an object to an array More... | |
| reference | operator+= (basic_json &&val) |
| add an object to an array More... | |
| void | push_back (const basic_json &val) |
| add an object to an array More... | |
| reference | operator+= (const basic_json &val) |
| add an object to an array More... | |
| void | push_back (const typename object_t::value_type &val) |
| add an object to an object More... | |
| reference | operator+= (const typename object_t::value_type &val) |
| add an object to an object More... | |
| void | push_back (initializer_list_t init) |
| add an object to an object More... | |
| reference | operator+= (initializer_list_t init) |
| add an object to an object More... | |
| template<class... Args> | |
| reference | emplace_back (Args &&... args) |
| add an object to an array More... | |
| template<class... Args> | |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| add an object to an object if key does not exist More... | |
| template<typename... Args> | |
| iterator | insert_iterator (const_iterator pos, Args &&... args) |
| Helper for insertion of an iterator. More... | |
| iterator | insert (const_iterator pos, const basic_json &val) |
| inserts element into array More... | |
| iterator | insert (const_iterator pos, basic_json &&val) |
| inserts element into array More... | |
| iterator | insert (const_iterator pos, size_type cnt, const basic_json &val) |
| inserts copies of element into array More... | |
| iterator | insert (const_iterator pos, const_iterator first, const_iterator last) |
| inserts range of elements into array More... | |
| iterator | insert (const_iterator pos, initializer_list_t ilist) |
| inserts elements from initializer list into array More... | |
| void | insert (const_iterator first, const_iterator last) |
| inserts range of elements into object More... | |
| void | update (const_reference j, bool merge_objects=false) |
| updates a JSON object from another object, overwriting existing keys More... | |
| void | update (const_iterator first, const_iterator last, bool merge_objects=false) |
| updates a JSON object from another object, overwriting existing keys More... | |
| 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 &&std::is_nothrow_move_assignable< json_value >::value) |
| exchanges the values More... | |
| void | swap (array_t &other) |
| exchanges the values More... | |
| void | swap (object_t &other) |
| exchanges the values More... | |
| void | swap (string_t &other) |
| exchanges the values More... | |
| void | swap (binary_t &other) |
| exchanges the values More... | |
| void | swap (typename binary_t::container_type &other) |
| exchanges the values More... | |
lexicographical comparison operators | |
| bool | operator== (const_reference lhs, const_reference rhs) noexcept |
| comparison: equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator== (const_reference lhs, ScalarType rhs) noexcept |
| comparison: equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator== (ScalarType lhs, const_reference rhs) noexcept |
| comparison: equal More... | |
| bool | operator!= (const_reference lhs, const_reference rhs) noexcept |
| comparison: not equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator!= (const_reference lhs, ScalarType rhs) noexcept |
| comparison: not equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator!= (ScalarType lhs, const_reference rhs) noexcept |
| comparison: not equal More... | |
| bool | operator< (const_reference lhs, const_reference rhs) noexcept |
| comparison: less than More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator< (const_reference lhs, ScalarType rhs) noexcept |
| comparison: less than More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator< (ScalarType lhs, const_reference rhs) noexcept |
| comparison: less than More... | |
| bool | operator<= (const_reference lhs, const_reference rhs) noexcept |
| comparison: less than or equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator<= (const_reference lhs, ScalarType rhs) noexcept |
| comparison: less than or equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator<= (ScalarType lhs, const_reference rhs) noexcept |
| comparison: less than or equal More... | |
| bool | operator> (const_reference lhs, const_reference rhs) noexcept |
| comparison: greater than More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator> (const_reference lhs, ScalarType rhs) noexcept |
| comparison: greater than More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator> (ScalarType lhs, const_reference rhs) noexcept |
| comparison: greater than More... | |
| bool | operator>= (const_reference lhs, const_reference rhs) noexcept |
| comparison: greater than or equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator>= (const_reference lhs, ScalarType rhs) noexcept |
| comparison: greater than or equal More... | |
| template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >::value, int >::type = 0> | |
| bool | operator>= (ScalarType lhs, const_reference rhs) noexcept |
| comparison: greater than or equal More... | |
serialization | |
| std::ostream & | operator<< (std::ostream &o, const basic_json &j) |
| serialize to stream More... | |
| __attribute__ ((__deprecated__("Since " "3.0.0" "; use " "operator<<(std::ostream&, const basic_json&)"))) friend std | |
| serialize to stream More... | |
element access | |
| const char *default_value | const |
| reference | at (size_type idx) |
| access specified array element with bounds checking More... | |
| const_reference | at (size_type idx) const |
| access specified array element with bounds checking More... | |
| reference | at (const typename object_t::key_type &key) |
| access specified object element with bounds checking More... | |
| const_reference | at (const typename object_t::key_type &key) const |
| access specified object element with bounds checking More... | |
| reference | operator[] (size_type idx) |
| access specified array element More... | |
| const_reference | operator[] (size_type idx) const |
| access specified array element More... | |
| reference | operator[] (const typename object_t::key_type &key) |
| access specified object element More... | |
| const_reference | operator[] (const typename object_t::key_type &key) const |
| access specified object element More... | |
| template<typename T > | |
| __attribute__ ((__nonnull__(2))) reference operator[](T *key) | |
| access specified object element More... | |
| template<typename T > | |
| __attribute__ ((__nonnull__(2))) const _reference operator[](T *key) const | |
| access specified object element More... | |
| template<class ValueType , typename std::enable_if< detail::is_getable< basic_json_t, ValueType >::value &&!std::is_same< value_t, ValueType >::value, int >::type = 0> | |
| ValueType | value (const typename object_t::key_type &key, const ValueType &default_value) const |
| access specified object element with default value More... | |
| string_t | value (const typename object_t::key_type &key, const char *default_value) const |
| access specified object element with default value More... | |
| template<class ValueType , typename std::enable_if< detail::is_getable< basic_json_t, ValueType >::value, int >::type = 0> | |
| ValueType | value (const json_pointer &ptr, const ValueType &default_value) const |
| access specified object element via JSON Pointer with default value More... | |
| __attribute__ ((__nonnull__(3))) string_t value(const json_pointer &ptr | |
| access specified object element via JSON Pointer with default value More... | |
| reference | front () |
| access the first element More... | |
| const_reference | front () const |
| access the first element More... | |
| reference | back () |
| access the last element More... | |
| const_reference | back () const |
| access the last element More... | |
| template<class IteratorType , typename std::enable_if< std::is_same< IteratorType, typename basic_json_t::iterator >::value||std::is_same< IteratorType, typename basic_json_t::const_iterator >::value, int >::type = 0> | |
| IteratorType | erase (IteratorType pos) |
| remove element given an iterator More... | |
| template<class IteratorType , typename std::enable_if< std::is_same< IteratorType, typename basic_json_t::iterator >::value||std::is_same< IteratorType, typename basic_json_t::const_iterator >::value, int >::type = 0> | |
| IteratorType | erase (IteratorType first, IteratorType last) |
| remove elements given an iterator range More... | |
| size_type | erase (const typename object_t::key_type &key) |
| remove element from a JSON object given a key More... | |
| void | erase (const size_type idx) |
| remove element from a JSON array given an index More... | |
deserialization | |
| const parser_callback_t | cb = nullptr |
| const parser_callback_t const bool | allow_exceptions = true |
| const parser_callback_t const bool const bool | ignore_comments |
| const parser_callback_t const bool const bool SAX SAX * | sax |
| const parser_callback_t const bool const bool SAX SAX input_format_t | format = input_format_t::json |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool | strict = true |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool | ignore_comments |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX IteratorType | last |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX IteratorType SAX * | sax |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX IteratorType SAX input_format_t | format = input_format_t::json |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX IteratorType SAX input_format_t const bool | strict = true |
| template<typename InputType > | |
| __attribute__ ((__warn_unused_result__)) static basic_json parse(InputType &&i | |
| deserialize from a compatible input More... | |
| const parser_callback_t const bool const bool SAX | __attribute__ ((__nonnull__(2))) static bool sax_parse(InputType &&i |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool class SAX | __attribute__ ((__nonnull__(3))) static bool sax_parse(IteratorType first |
binary serialization/deserialization support | |
| const bool | strict = true |
| const bool const bool | allow_exceptions = true |
| static std::vector< std::uint8_t > | to_cbor (const basic_json &j) |
| create a CBOR serialization of a given JSON value More... | |
| static void | to_cbor (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a CBOR serialization of a given JSON value More... | |
| static void | to_cbor (const basic_json &j, detail::output_adapter< char > o) |
| create a CBOR serialization of a given JSON value More... | |
| static std::vector< std::uint8_t > | to_msgpack (const basic_json &j) |
| create a MessagePack serialization of a given JSON value More... | |
| static void | to_msgpack (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a MessagePack serialization of a given JSON value More... | |
| static void | to_msgpack (const basic_json &j, detail::output_adapter< char > o) |
| create a MessagePack serialization of a given JSON value More... | |
| 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 More... | |
| 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 More... | |
| 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 More... | |
| static std::vector< std::uint8_t > | to_bson (const basic_json &j) |
| create a BSON serialization of a given JSON value More... | |
| static void | to_bson (const basic_json &j, detail::output_adapter< std::uint8_t > o) |
| create a BSON serialization of a given JSON value More... | |
| static void | to_bson (const basic_json &j, detail::output_adapter< char > o) |
| create a BSON serialization of a given JSON value More... | |
| template<typename InputType > | |
| __attribute__ ((__warn_unused_result__)) static basic_json from_cbor(InputType &&i | |
| create a JSON value from an input in CBOR format More... | |
value access | |
| 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) More... | |
| 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) More... | |
| template<typename ValueTypeCV , typename ValueType = detail::uncvref_t<ValueTypeCV>> | |
| constexpr 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) More... | |
| 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) More... | |
| 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) More... | |
| 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) More... | |
| 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) More... | |
| template<typename ValueType , typename std::enable_if< detail::conjunction< detail::negation< std::is_pointer< ValueType > >, 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::negation< std::is_same< ValueType, std::string_view > >, detail::is_detected_lazy< detail::get_template_function, const basic_json_t &, ValueType > >::value, int >::type = 0> | |
| operator ValueType () const | |
| get a value (implicit) More... | |
| binary_t & | get_binary () |
| get a binary value More... | |
| const binary_t & | get_binary () const |
| get a binary value More... | |
constructors and destructors | |
Constructors of class basic_json, copy/move constructor, copy assignment, static functions creating objects, and the destructor. | |
| basic_json (const value_t v) | |
| create an empty value with a given type More... | |
| basic_json (std::nullptr_t=nullptr) noexcept | |
| create a null object More... | |
| 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 More... | |
| 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 More... | |
| 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 More... | |
| __attribute__ ((__warn_unused_result__)) static basic_json binary(const typename binary_t | |
| explicitly create a binary array (without subtype) More... | |
| __attribute__ ((__warn_unused_result__)) static basic_json binary(const typename binary_t | |
| explicitly create a binary array (with subtype) More... | |
| __attribute__ ((__warn_unused_result__)) static basic_json binary(typename binary_t | |
| explicitly create a binary array More... | |
| __attribute__ ((__warn_unused_result__)) static basic_json binary(typename binary_t | |
| explicitly create a binary array (with subtype) More... | |
| __attribute__ ((__warn_unused_result__)) static basic_json array(initializer_list_t init | |
| explicitly create an array from an initializer list More... | |
lookup | |
| template<typename KeyT > | |
| iterator | find (KeyT &&key) |
| find an element in a JSON object More... | |
| template<typename KeyT > | |
| const_iterator | find (KeyT &&key) const |
| find an element in a JSON object More... | |
| template<typename KeyT > | |
| size_type | count (KeyT &&key) const |
| returns the number of occurrences of a key in a JSON object More... | |
| template<typename KeyT , typename std::enable_if< !std::is_same< typename std::decay< KeyT >::type, json_pointer >::value, int >::type = 0> | |
| bool | contains (KeyT &&key) const |
| check the existence of an element in a JSON object More... | |
| bool | contains (const json_pointer &ptr) const |
| check the existence of an element in a JSON object given a JSON pointer More... | |
iterators | |
| iterator | begin () noexcept |
| returns an iterator to the first element More... | |
| const_iterator | begin () const noexcept |
| returns an iterator to the first element More... | |
| const_iterator | cbegin () const noexcept |
| returns a const iterator to the first element More... | |
| iterator | end () noexcept |
| returns an iterator to one past the last element More... | |
| const_iterator | end () const noexcept |
| returns an iterator to one past the last element More... | |
| const_iterator | cend () const noexcept |
| returns an iterator to one past the last element More... | |
| reverse_iterator | rbegin () noexcept |
| returns an iterator to the reverse-beginning More... | |
| const_reverse_iterator | rbegin () const noexcept |
| returns an iterator to the reverse-beginning More... | |
| reverse_iterator | rend () noexcept |
| returns an iterator to the reverse-end More... | |
| const_reverse_iterator | rend () const noexcept |
| returns an iterator to the reverse-end More... | |
| const_reverse_iterator | crbegin () const noexcept |
| returns a const reverse iterator to the last element More... | |
| const_reverse_iterator | crend () const noexcept |
| returns a const reverse iterator to one before the first More... | |
| __attribute__ ((__deprecated__("Since " "3.1.0" "; use " "items()"))) static iteration_proxy< iterator > iterator_wrapper(reference ref) noexcept | |
| wrapper to access iterator member functions in range-based for More... | |
| __attribute__ ((__deprecated__("Since " "3.1.0" "; use " "items()"))) static iteration_proxy< const_iterator > iterator_wrapper(const_reference ref) noexcept | |
| wrapper to access iterator member functions in range-based for More... | |
| iteration_proxy< iterator > | items () noexcept |
| helper to access iterator member functions in range-based for More... | |
| iteration_proxy< const_iterator > | items () const noexcept |
| helper to access iterator member functions in range-based for More... | |
capacity | |
| bool | empty () const noexcept |
| checks whether the container is empty. More... | |
| size_type | size () const noexcept |
| returns the number of elements More... | |
| size_type | max_size () const noexcept |
| returns the maximum possible number of elements More... | |
a class to store JSON values
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::array_t = ArrayType<basic_json, AllocatorType<basic_json> > |
a type for an array
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::binary_t = nlohmann::byte_container_with_subtype<BinaryType> |
a type for a packed binary type
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::boolean_t = BooleanType |
a type for a boolean
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::number_float_t = NumberFloatType |
a type for a number (floating-point)
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::number_integer_t = NumberIntegerType |
a type for a number (integer)
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::number_unsigned_t = NumberUnsignedType |
a type for a number (unsigned)
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::object_comparator_t = std::less<> |
object key comparator type
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::object_t = ObjectType<StringType, basic_json, object_comparator_t, AllocatorType<std::pair<const StringType, basic_json> >> |
a type for an object
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse_event_t = detail::parse_event_t |
parser event types
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parser_callback_t = detail::parser_callback_t<basic_json> |
per-element parser callback type
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::string_t = StringType |
a type for a string
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json | ( | const value_t | v | ) |
create an empty value with a given type
|
noexcept |
create a null object
|
noexcept |
create a JSON value from compatible types
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json | ( | const BasicJsonType & | val | ) |
create a JSON value from an existing one
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::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
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__deprecated__("Since " "3.0.0" "; use " "operator<<(std::ostream&, const basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >&)")) | ) |
serialize to stream
|
noexcept |
wrapper to access iterator member functions in range-based for
|
noexcept |
wrapper to access iterator member functions in range-based for
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__nonnull__(2)) | ) | const |
access specified object element
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__nonnull__(2)) | ) |
access specified object element
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__nonnull__(3)) | ) | const & |
access specified object element via JSON Pointer with default value
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) |
explicitly create an array from an initializer list
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) | const |
explicitly create a binary array (without subtype)
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) | const |
explicitly create a binary array (with subtype)
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) |
explicitly create a binary array
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) |
explicitly create a binary array (with subtype)
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) | && |
create a JSON value from an input in CBOR format
References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::m_value, std::swap(), and nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap().
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) |
returns version information on the library
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::__attribute__ | ( | (__warn_unused_result__) | ) | && |
deserialize from a compatible input
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at | ( | const typename object_t::key_type & | key | ) |
access specified object element with bounds checking
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at | ( | const typename object_t::key_type & | key | ) | const |
access specified object element with bounds checking
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at | ( | size_type | idx | ) |
access specified array element with bounds checking
References val().
Referenced by Feel::FeelModels::ModelMesh< IndexType >::FieldsSetup::PartSetup::create(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Neumann::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Robin::setup(), Feel::FeelModels::ElectricBoundaryConditions::SurfaceChargeDensity::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::Inlet::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::NormalStress::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::PressureImposed::setup(), Feel::FeelModels::HeatBoundaryConditions::HeatFlux::setup(), Feel::FeelModels::HeatBoundaryConditions::ConvectiveHeatFlux::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::NormalStress::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::Robin::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::setup(), Feel::FeelModels::ElectricBoundaryConditions::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::setup(), Feel::FeelModels::HeatBoundaryConditions::setup(), Feel::FeelModels::SolidMechanics1dReducedBoundaryConditions< Dim >::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::setup(), Feel::FeelModels::GenericDirichletBoundaryCondition< Dim1, Dim2 >::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Neumann::tabulateInformations(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Robin::tabulateInformations(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::Ground::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::SurfaceChargeDensity::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::MeshVelocityImposed::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::Inlet::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::NormalStress::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::PressureImposed::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletFree::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletWindkessel::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::BodyInterface::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::HeatFlux::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::ConvectiveHeatFlux::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::tabulateInformations(), Feel::FeelModels::GenericDirichletBoundaryCondition< Dim1, Dim2 >::tabulateInformations(), Feel::FeelModels::SolidMechanics1dReducedBoundaryConditions< Dim >::tabulateInformations(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::NormalStress::tabulateInformations(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::Robin::tabulateInformations(), and Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::tabulateInformations().
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at | ( | size_type | idx | ) | const |
access specified array element with bounds checking
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::back | ( | ) |
access the last element
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::back | ( | ) | const |
access the last element
|
noexcept |
returns an iterator to the first element
|
noexcept |
returns an iterator to the first element
Referenced by Feel::JournalWatcher::addInformationObject(), and Feel::JournalWatcher::putInformationObject().
|
noexcept |
returns a const iterator to the first element
|
noexcept |
returns an iterator to one past the last element
|
noexcept |
clears the contents
| bool nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::contains | ( | const json_pointer & | ptr | ) | const |
check the existence of an element in a JSON object given a JSON pointer
| bool nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::contains | ( | KeyT && | key | ) | const |
check the existence of an element in a JSON object
Referenced by Feel::FeelModels::ModelMesh< IndexType >::FieldsSetup::PartSetup::create(), Feel::RemoteData::Girder::deleteResource(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Neumann::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Robin::setup(), Feel::FeelModels::ElectricBoundaryConditions::SurfaceChargeDensity::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::Inlet::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::NormalStress::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::PressureImposed::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletFree::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletWindkessel::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::BodyInterface::setup(), Feel::FeelModels::HeatBoundaryConditions::HeatFlux::setup(), Feel::FeelModels::HeatBoundaryConditions::ConvectiveHeatFlux::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::NormalStress::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::Robin::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::setup(), Feel::FeelModels::ElectricBoundaryConditions::setup(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::setup(), Feel::FeelModels::HeatBoundaryConditions::setup(), Feel::FeelModels::SolidMechanics1dReducedBoundaryConditions< Dim >::setup(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::setup(), Feel::FeelModels::GenericDirichletBoundaryCondition< Dim1, Dim2 >::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Neumann::tabulateInformations(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::Robin::tabulateInformations(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::Ground::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::SurfaceChargeDensity::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::MeshVelocityImposed::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::Inlet::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::NormalStress::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::PressureImposed::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletFree::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::OutletWindkessel::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::BodyInterface::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::HeatFlux::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::ConvectiveHeatFlux::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::tabulateInformations(), Feel::FeelModels::GenericDirichletBoundaryCondition< Dim1, Dim2 >::tabulateInformations(), Feel::FeelModels::SolidMechanics1dReducedBoundaryConditions< Dim >::tabulateInformations(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::NormalStress::tabulateInformations(), Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::Robin::tabulateInformations(), and Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::tabulateInformations().
| size_type nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::count | ( | KeyT && | key | ) | const |
returns the number of occurrences of a key in a JSON object
|
noexcept |
returns a const reverse iterator to the last element
|
noexcept |
returns a const reverse iterator to one before the first
| std::pair< iterator, bool > nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace | ( | Args &&... | args | ) |
add an object to an object if key does not exist
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace_back | ( | Args &&... | args | ) |
add an object to an array
|
noexcept |
checks whether the container is empty.
|
noexcept |
returns an iterator to one past the last element
|
noexcept |
returns an iterator to one past the last element
Referenced by Feel::JournalWatcher::addInformationObject(), and Feel::JournalWatcher::putInformationObject().
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase | ( | const size_type | idx | ) |
remove element from a JSON array given an index
| size_type nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase | ( | const typename object_t::key_type & | key | ) |
remove element from a JSON object given a key
| IteratorType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase | ( | IteratorType | first, |
| IteratorType | last | ||
| ) |
remove elements given an iterator range
| IteratorType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase | ( | IteratorType | pos | ) |
remove element given an iterator
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::find | ( | KeyT && | key | ) |
find an element in a JSON object
| const_iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::find | ( | KeyT && | key | ) | const |
find an element in a JSON object
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::front | ( | ) |
access the first element
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::front | ( | ) | const |
access the first element
|
constexprnoexcept |
get a (pointer) value (explicit)
Performs explicit type conversion between the JSON value and a compatible value if required.
from_json() method.| ValueTypeCV | the provided value type |
| ValueType | the returned value type |
| ValueType | if necessary |
| what | json_serializer<ValueType> from_json() method throws if conversion is required |
References nlohmann::detail::serializer< BasicJsonType >::dump().
Referenced by Feel::RemoteData::Girder::deleteResource().
|
noexcept |
get a pointer value (explicit)
Explicit pointer access to the internally stored JSON value. No copies are made.
| PointerType | pointer type; must be a pointer to array_t, object_t, string_t, boolean_t, number_integer_t, number_unsigned_t, or number_float_t. |
nullptr otherwise@complexity Constant.
@liveexample{The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a nullptr is returned if the value and the requested pointer type does not match.,get__PointerType}
|
static |
returns the allocator associated with the container
| binary_t & nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_binary | ( | ) |
get a binary value
| const binary_t & nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_binary | ( | ) | const |
get a binary value
|
constexprnoexcept |
get a pointer value (implicit)
|
noexcept |
get a pointer value (implicit)
| ReferenceType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_ref | ( | ) |
get a reference value (implicit)
| ReferenceType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_ref | ( | ) | const |
get a reference value (implicit)
|
noexcept |
get a value (explicit)
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | first, |
| const_iterator | last | ||
| ) |
inserts range of elements into object
References nlohmann::detail::array, nlohmann::detail::binary, nlohmann::detail::object, and nlohmann::detail::string.
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | pos, |
| basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > && | val | ||
| ) |
inserts element into array
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | pos, |
| const basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > & | val | ||
| ) |
inserts element into array
Referenced by Feel::JournalWatcher::addInformationObject(), and Feel::FeelModels::ModelPhysics< ConvexType::nRealDim >::physics().
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | pos, |
| const_iterator | first, | ||
| const_iterator | last | ||
| ) |
inserts range of elements into array
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | pos, |
| initializer_list_t | ilist | ||
| ) |
inserts elements from initializer list into array
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert | ( | const_iterator | pos, |
| size_type | cnt, | ||
| const basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > & | val | ||
| ) |
inserts copies of element into array
| iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert_iterator | ( | const_iterator | pos, |
| Args &&... | args | ||
| ) |
Helper for insertion of an iterator.
|
noexcept |
helper to access iterator member functions in range-based for
|
noexcept |
helper to access iterator member functions in range-based for
Referenced by Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::setup(), Feel::FeelModels::CoefficientFormPDEBoundaryConditions< Dim, EquationRank >::tabulateInformations(), Feel::FeelModels::ElectricBoundaryConditions::tabulateInformations(), Feel::FeelModels::FluidMechanicsBoundaryConditions< Dim >::tabulateInformations(), Feel::FeelModels::HeatBoundaryConditions::tabulateInformations(), Feel::FeelModels::SolidMechanics1dReducedBoundaryConditions< Dim >::tabulateInformations(), and Feel::FeelModels::SolidMechanicsBoundaryConditions< Dim >::tabulateInformations().
|
noexcept |
returns the maximum possible number of elements
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator ValueType | ( | ) | const |
get a value (implicit)
Implicit type conversion between the JSON value and a compatible value. The call is realized by calling get() const.
| ValueType | non-pointer type compatible to the JSON value, for instance int for JSON integer numbers, bool for JSON booleans, or std::vector types for JSON arrays. The character type of string_t as well as an initializer list of this type is excluded to avoid ambiguities as these types implicitly convert to std::string. |
| type_error.302 | in case passed type ValueType is incompatible to the JSON value type (e.g., the JSON value is of type boolean, but a string is requested); see example below |
@complexity Linear in the size of the JSON value.
@liveexample{The example below shows several conversions from JSON values to other types. There a few things to note: (1) Floating-point numbers can be converted to integers\, (2) A JSON array can be converted to a standard std::vector<short>\, (3) A JSON object can be converted to C++ associative containers such as std::unordered_map<std::string\, json>.,operator__ValueType}
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator+= | ( | basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > && | val | ) |
add an object to an array
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator+= | ( | const basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > & | val | ) |
add an object to an array
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator+= | ( | const typename object_t::value_type & | val | ) |
add an object to an object
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator+= | ( | initializer_list_t | init | ) |
add an object to an object
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[] | ( | const typename object_t::key_type & | key | ) |
access specified object element
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[] | ( | const typename object_t::key_type & | key | ) | const |
access specified object element
| reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[] | ( | size_type | idx | ) |
access specified array element
| const_reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[] | ( | size_type | idx | ) | const |
access specified array element
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back | ( | basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > && | val | ) |
add an object to an array
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back | ( | const basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > & | val | ) |
add an object to an array
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back | ( | const typename object_t::value_type & | val | ) |
add an object to an object
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back | ( | initializer_list_t | init | ) |
add an object to an object
|
noexcept |
returns an iterator to the reverse-beginning
|
noexcept |
returns an iterator to the reverse-beginning
|
noexcept |
returns an iterator to the reverse-end
|
noexcept |
returns an iterator to the reverse-end
|
noexcept |
returns the number of elements
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap | ( | array_t & | other | ) |
exchanges the values
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap | ( | binary_t & | other | ) |
exchanges the values
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap | ( | object_t & | other | ) |
exchanges the values
|
noexcept |
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap | ( | string_t & | other | ) |
exchanges the values
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap | ( | typename binary_t::container_type & | other | ) |
exchanges the values
|
static |
create a BSON serialization of a given JSON value
|
static |
create a BSON serialization of a given JSON value
|
static |
create a BSON serialization of a given JSON value
|
static |
create a CBOR serialization of a given JSON value
|
static |
create a CBOR serialization of a given JSON value
|
static |
create a CBOR serialization of a given JSON value
References nlohmann::detail::object.
|
static |
create a MessagePack serialization of a given JSON value
|
static |
create a MessagePack serialization of a given JSON value
|
static |
create a MessagePack serialization of a given JSON value
|
static |
create a UBJSON serialization of a given JSON value
|
static |
create a UBJSON serialization of a given JSON value
|
static |
create a UBJSON serialization of a given JSON value
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::update | ( | const_iterator | first, |
| const_iterator | last, | ||
| bool | merge_objects = false |
||
| ) |
updates a JSON object from another object, overwriting existing keys
| void nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::update | ( | const_reference | j, |
| bool | merge_objects = false |
||
| ) |
updates a JSON object from another object, overwriting existing keys
Referenced by Feel::JournalWatcher::putInformationObject().
| ValueType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value | ( | const json_pointer & | ptr, |
| const ValueType & | default_value | ||
| ) | const |
access specified object element via JSON Pointer with default value
| string_t nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value | ( | const typename object_t::key_type & | key, |
| const char * | default_value | ||
| ) | const |
access specified object element with default value
| ValueType nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value | ( | const typename object_t::key_type & | key, |
| const ValueType & | default_value | ||
| ) | const |
access specified object element with default value
|
friend |
comparison: not equal
|
friend |
comparison: not equal
|
friend |
comparison: not equal
|
friend |
comparison: less than
|
friend |
comparison: less than
|
friend |
comparison: less than
|
friend |
serialize to stream
|
friend |
comparison: less than or equal
|
friend |
comparison: less than or equal
|
friend |
comparison: less than or equal
|
friend |
comparison: equal
|
friend |
comparison: equal
|
friend |
comparison: equal
|
friend |
comparison: greater than
|
friend |
comparison: greater than
|
friend |
comparison: greater than
|
friend |
comparison: greater than or equal
|
friend |
comparison: greater than or equal
|
friend |
comparison: greater than or equal
|
friend |
exchanges the values
| const char* default_value nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::const |
| const parser_callback_t const bool const bool SAX SAX input_format_t const bool const bool nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::ignore_comments |