|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
a class to store JSON values More...
#include <json.hpp>
Public Attributes | |
| *JSON | Pointer |
| *SAX interface | type |
| **brief returns the allocator associated with the container *sa | https: static allocator_type get_allocator() { return allocator_type() |
| *brief returns version information on the library *sa | https: JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json meta() { basic_json result |
| result ["copyright"] = "(C) 2013-2022 Niels Lohmann" | |
| return | result |
| ***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa | https: using object_t = ObjectType<StringType |
| ***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa | basic_json |
| ***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa | object_comparator_t |
| ***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa | AllocatorType< std::pair< const StringType, basic_json > > |
| *brief a type for an array *sa | https: using array_t = ArrayType<basic_json |
| *brief a type for an array *sa | AllocatorType< basic_json > |
| *brief a type for a string *sa | https: using string_t = StringType |
| *brief a type for a boolean *sa | https: using boolean_t = BooleanType |
| *brief a type for a number *(integer) *@sa https brief a type for a number *(unsigned) *@sa https brief a type for a number *(floating-point) *@sa https brief a type for a packed binary type *sa | https: using binary_t = nlohmann::byte_container_with_subtype<BinaryType> |
| ***brief parser event types *sa | https: using parse_event_t = detail::parse_event_t |
| *brief per element parser callback type *sa | https: using parser_callback_t = detail::parser_callback_t<basic_json> |
| ***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy * | assignment |
| ***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy static functions creating and the destructor **the value of the current element json_value | m_value = {} |
Static Public Attributes | |
| ***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy static functions creating | objects |
Private Types | |
| using | basic_json_t = NLOHMANN_BASIC_JSON_TPL |
| using | primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t |
| template<typename BasicJsonType> | |
| using | internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType> |
| template<typename BasicJsonType> | |
| using | iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType> |
| template<typename Iterator> | |
| using | iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator> |
| template<typename Base> | |
| using | json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base> |
| template<typename CharType> | |
| using | output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType> |
| template<typename InputType> | |
| using | binary_reader = ::nlohmann::detail::binary_reader<basic_json, InputType> |
| template<typename CharType> | |
| using | binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType> |
Private Member Functions | |
| template<typename InputAdapterType> | |
| static ::nlohmann::detail::parser< basic_json, InputAdapterType > | parser (InputAdapterType adapter, detail::parser_callback_t< basic_json > cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false) |
| * | array (stored with pointer to save storage) array_t *array |
| * | string (stored with pointer to save storage) string_t *string |
| * | binary (stored with pointer to save storage) binary_t *binary |
| * | number (integer) number_integer_t number_integer |
| * | number (unsigned integer) number_unsigned_t number_unsigned |
| * | number (floating-point) number_float_t number_float |
| *default | constructor (for null values) json_value()=default |
| *constructor for booleans | json_value (boolean_t v) noexcept |
| *constructor for | numbers (integer) json_value(number_integer_t v) noexcept |
| *constructor for | numbers (unsigned) json_value(number_unsigned_t v) noexcept |
| *constructor for | numbers (floating-point) json_value(number_float_t v) noexcept |
| *constructor for empty values of a given type | json_value (value_t t) |
| *constructor for strings | json_value (const string_t &value) |
| *constructor for rvalue strings | json_value (string_t &&value) |
| *constructor for objects | json_value (const object_t &value) |
| *constructor for rvalue objects | json_value (object_t &&value) |
| *constructor for arrays | json_value (const array_t &value) |
| *constructor for rvalue arrays | json_value (array_t &&value) |
| *constructor for binary arrays | json_value (const typename binary_t::container_type &value) |
| *constructor for rvalue binary arrays | json_value (typename binary_t::container_type &&value) |
| *constructor for binary | arrays (internal type) json_value(const binary_t &value) |
| *constructor for rvalue binary | arrays (internal type) json_value(binary_t &&value) |
| void | destroy (value_t t) |
| void | assert_invariant (bool check_parents=true) const noexcept |
| checks the class invariants | |
| void | set_parents () |
| iterator | set_parents (iterator it, typename iterator::difference_type count_set_parents) |
| reference | set_parent (reference j, std::size_t old_capacity=static_cast< std::size_t >(-1)) |
Static Private Member Functions | |
| template<typename T, typename... Args> | |
| *helper for exception safe object creation static JSON_HEDLEY_RETURNS_NON_NULL T * | create (Args &&... args) |
Private Attributes | |
| JSON_PRIVATE_UNLESS_TESTED | : using lexer = ::nlohmann::detail::lexer_base<basic_json> |
| JSON_PRIVATE_UNLESS_TESTED | : using serializer = ::nlohmann::detail::serializer<basic_json> |
| ** | JSON_PRIVATE_UNLESS_TESTED: union json_value { * object (stored with pointer to save storage) object_t* object |
| *boolean boolean_t | boolean |
Friends | |
| template<detail::value_t> | |
| struct | detail::external_constructor |
| template<typename BasicJsonType, typename InputType> | |
| class | ::nlohmann::detail::parser |
| template<typename BasicJsonType> | |
| class | ::nlohmann::detail::iter_impl |
| template<typename BasicJsonType, typename CharType> | |
| class | ::nlohmann::detail::binary_writer |
| template<typename BasicJsonType, typename InputType, typename SAX> | |
| class | ::nlohmann::detail::binary_reader |
| template<typename BasicJsonType> | |
| class | ::nlohmann::detail::json_sax_dom_parser |
| template<typename BasicJsonType> | |
| class | ::nlohmann::detail::json_sax_dom_callback_parser |
| class | ::nlohmann::detail::exception |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::allocator_type = AllocatorType<basic_json> |
|
private |
|
private |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::cbor_tag_handler_t = detail::cbor_tag_handler_t |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::const_iterator = iter_impl<const basic_json> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::const_pointer = typename std::allocator_traits<allocator_type>::const_pointer |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::const_reference = const value_type& |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::difference_type = std::ptrdiff_t |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::error_handler_t = detail::error_handler_t |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::initializer_list_t = std::initializer_list<detail::json_ref<basic_json>> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::input_format_t = detail::input_format_t |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::invalid_iterator = detail::invalid_iterator |
|
private |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::iterator = iter_impl<basic_json> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_pointer = ::nlohmann::json_pointer<basic_json> |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_sax_t = json_sax<basic_json> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_serializer = JSONSerializer<T, SFINAE> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::other_error = detail::other_error |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::out_of_range = detail::out_of_range |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse_error |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::pointer = typename std::allocator_traits<allocator_type>::pointer |
|
private |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::reference |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::reverse_iterator = json_reverse_iterator<typename basic_json::iterator> |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::size_type = std::size_t |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::type_error = detail::type_error |
| using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value_t = detail::value_t |
|
private |
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::destroy().
|
inlineprivate |
|
inlineprivate |
|
inlineprivatenoexcept |
This function asserts the class invariants. It needs to be called at the end of every constructor to make sure that created objects respect the invariant. Furthermore, it has to be called each time the type of a JSON value is changed, because the invariant expresses a relationship between m_type and m_value.
Furthermore, the parent relation is checked for arrays and objects: If check_parents true and the value is an array or object, then the container's elements must have the current value as parent.
| [in] | check_parents | whether the parent relation should be checked. The value is true by default and should only be set to false during destruction of objects when the invariant does not need to hold. |
|
private |
|
privatedefault |
|
inlinestaticprivate |
Definition at line 16465 of file json.hpp.
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::json_value().
|
inlineprivate |
|
inlineprivate |
|
inlineprivatenoexcept |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 16777 of file json.hpp.
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::set_parent().
|
inlineprivate |
|
private |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
| * * * name JSON value data types* The data types to store a JSON value These types are derived from* the template arguments passed to class ref basic_json* * brief a type for an object* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json |
Definition at line 16430 of file json.hpp.
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::json_value().
|
private |
|
private |
| * brief a type for an array* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::AllocatorType< basic_json > |
| * * * name JSON value data types* The data types to store a JSON value These types are derived from* the template arguments passed to class ref basic_json* * brief a type for an object* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::AllocatorType< std::pair< const StringType, basic_json > > |
| * * * name constructors and destructors* Constructors of class ref basic_json copy move constructor copy* nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::assignment |
|
private |
| * brief per element parser callback type* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * * * brief parser event types* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * brief a type for a number* (integer) * @sa https brief a type for a number* (unsigned) * @sa https brief a type for a number* (floating-point) * @sa https brief a type for a packed binary type* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * brief a type for a boolean* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * brief a type for a string* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * brief a type for an array* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * * * name JSON value data types* The data types to store a JSON value These types are derived from* the template arguments passed to class ref basic_json* * brief a type for an object* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * brief returns version information on the library* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
| * * brief returns the allocator associated with the container* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::https |
|
private |
| * * * name constructors and destructors* Constructors of class ref basic_json copy move constructor copy static functions creating and the destructor* * the value of the current element json_value nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::m_value = {} |
Definition at line 19557 of file json.hpp.
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::destroy().
| * * * name JSON value data types* The data types to store a JSON value These types are derived from* the template arguments passed to class ref basic_json* * brief a type for an object* sa nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::object_comparator_t |
|
static |
| * JSON nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::Pointer |
| return nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::result |
| nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::result["compiler"]["c++"] = "(C) 2013-2022 Niels Lohmann" |
| * SAX interface nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::type |
Definition at line 16284 of file json.hpp.
Referenced by nlohmann::basic_json< nlohmann::ordered_map >::set_parent().