json.hpp
algorithm
cstddef
functional
initializer_list
iosfwd
iterator
memory
numeric
string
utility
vector
type_traits
array
forward_list
map
tuple
unordered_map
valarray
exception
stdexcept
cstdint
cstdlib
cassert
limits
cmath
cstdio
cstring
istream
clocale
cctype
ios
ostream
cudnn_frontend_Errata.h
valarray
functional
limits
iterator
cstdint
cmath
cassert
stdexcept
numeric
string
map
exception
ostream
ios
cstdio
json.hpp
tuple
vector
utility
array
iosfwd
cstdlib
clocale
cctype
cstddef
unordered_map
type_traits
forward_list
algorithm
cstring
memory
istream
initializer_list
cudnn_frontend_get_plan.h
cudnn_frontend_Errata.h
cudnn_frontend_EngineConfigGenerator.h
json.hpp
cudnn_frontend.h
cudnn_frontend_find_plan.h
nlohmann::detail::position_t
nlohmann::detail::exception
nlohmann::detail::parse_error
nlohmann::detail::invalid_iterator
nlohmann::detail::type_error
nlohmann::detail::out_of_range
nlohmann::detail::other_error
nlohmann::detail::integer_sequence
nlohmann::detail::utility_internal::Extend
nlohmann::detail::utility_internal::Extend< integer_sequence< T, Ints... >, SeqSize, 0 >
nlohmann::detail::utility_internal::Extend< integer_sequence< T, Ints... >, SeqSize, 1 >
nlohmann::detail::utility_internal::Gen
nlohmann::detail::utility_internal::Gen< T, 0 >
nlohmann::detail::priority_tag
nlohmann::detail::priority_tag< 0 >
nlohmann::detail::static_const
nlohmann::detail::identity_tag
nlohmann::detail::make_void
nlohmann::detail::iterator_types
nlohmann::detail::iterator_types< It, void_t< typename It::difference_type, typename It::value_type, typename It::pointer, typename It::reference, typename It::iterator_category > >
nlohmann::detail::iterator_traits
nlohmann::detail::iterator_traits< T, enable_if_t< !std::is_pointer< T >::value > >
nlohmann::detail::iterator_traits< T *, enable_if_t< std::is_object< T >::value > >
nlohmann::detail::nonesuch
nlohmann::detail::detector
nlohmann::detail::detector< Default, void_t< Op< Args... > >, Op, Args... >
nlohmann::adl_serializer
nlohmann::basic_json
nlohmann::json_pointer
nlohmann::ordered_map
nlohmann::detail::is_basic_json
nlohmann::detail::is_basic_json< NLOHMANN_BASIC_JSON_TPL >
nlohmann::detail::json_ref
nlohmann::detail::is_json_ref
nlohmann::detail::is_json_ref< json_ref< T > >
nlohmann::detail::has_from_json
nlohmann::detail::is_getable
nlohmann::detail::has_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
nlohmann::detail::has_non_default_from_json
nlohmann::detail::has_non_default_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
nlohmann::detail::has_to_json
nlohmann::detail::has_to_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
nlohmann::detail::conjunction
nlohmann::detail::conjunction< B1 >
nlohmann::detail::conjunction< B1, Bn... >
nlohmann::detail::is_default_constructible
nlohmann::detail::is_default_constructible< std::pair< T1, T2 > >
nlohmann::detail::is_default_constructible< const std::pair< T1, T2 > >
nlohmann::detail::is_default_constructible< std::tuple< Ts... > >
nlohmann::detail::is_default_constructible< const std::tuple< Ts... > >
nlohmann::detail::is_constructible
nlohmann::detail::is_constructible< std::pair< T1, T2 > >
nlohmann::detail::is_constructible< const std::pair< T1, T2 > >
nlohmann::detail::is_constructible< std::tuple< Ts... > >
nlohmann::detail::is_constructible< const std::tuple< Ts... > >
nlohmann::detail::is_iterator_traits
nlohmann::detail::is_iterator_traits< iterator_traits< T > >
nlohmann::detail::is_complete_type
nlohmann::detail::is_complete_type< T, decltype(void(sizeof(T)))>
nlohmann::detail::is_compatible_object_type_impl
nlohmann::detail::is_compatible_object_type_impl< BasicJsonType, CompatibleObjectType, enable_if_t< is_detected< mapped_type_t, CompatibleObjectType >::value &&is_detected< key_type_t, CompatibleObjectType >::value > >
nlohmann::detail::is_compatible_object_type
nlohmann::detail::is_constructible_object_type_impl
nlohmann::detail::is_constructible_object_type_impl< BasicJsonType, ConstructibleObjectType, enable_if_t< is_detected< mapped_type_t, ConstructibleObjectType >::value &&is_detected< key_type_t, ConstructibleObjectType >::value > >
nlohmann::detail::is_constructible_object_type
nlohmann::detail::is_compatible_string_type_impl
nlohmann::detail::is_compatible_string_type_impl< BasicJsonType, CompatibleStringType, enable_if_t< is_detected_exact< typename BasicJsonType::string_t::value_type, value_type_t, CompatibleStringType >::value > >
nlohmann::detail::is_compatible_string_type
nlohmann::detail::is_constructible_string_type_impl
nlohmann::detail::is_constructible_string_type_impl< BasicJsonType, ConstructibleStringType, enable_if_t< is_detected_exact< typename BasicJsonType::string_t::value_type, value_type_t, ConstructibleStringType >::value > >
nlohmann::detail::is_constructible_string_type
nlohmann::detail::is_compatible_array_type_impl
nlohmann::detail::is_compatible_array_type_impl< BasicJsonType, CompatibleArrayType, enable_if_t< is_detected< value_type_t, CompatibleArrayType >::value &&is_detected< iterator_t, CompatibleArrayType >::value &&!is_iterator_traits< iterator_traits< CompatibleArrayType > >::value > >
nlohmann::detail::is_compatible_array_type
nlohmann::detail::is_constructible_array_type_impl
nlohmann::detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value > >
nlohmann::detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< !std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value &&is_default_constructible< ConstructibleArrayType >::value &&(std::is_move_assignable< ConstructibleArrayType >::value||std::is_copy_assignable< ConstructibleArrayType >::value)&&is_detected< value_type_t, ConstructibleArrayType >::value &&is_detected< iterator_t, ConstructibleArrayType >::value &&is_complete_type< detected_t< value_type_t, ConstructibleArrayType > >::value > >
nlohmann::detail::is_constructible_array_type
nlohmann::detail::is_compatible_integer_type_impl
nlohmann::detail::is_compatible_integer_type_impl< RealIntegerType, CompatibleNumberIntegerType, enable_if_t< std::is_integral< RealIntegerType >::value &&std::is_integral< CompatibleNumberIntegerType >::value &&!std::is_same< bool, CompatibleNumberIntegerType >::value > >
nlohmann::detail::is_compatible_integer_type
nlohmann::detail::is_compatible_type_impl
nlohmann::detail::is_compatible_type_impl< BasicJsonType, CompatibleType, enable_if_t< is_complete_type< CompatibleType >::value > >
nlohmann::detail::is_compatible_type
nlohmann::detail::is_constructible_tuple
nlohmann::detail::is_constructible_tuple< T1, std::tuple< Args... > >
nlohmann::detail::from_json_fn
nlohmann::detail::iteration_proxy_value
nlohmann::detail::iteration_proxy
std::tuple_size<::nlohmann::detail::iteration_proxy_value< IteratorType > >
std::tuple_element< N, ::nlohmann::detail::iteration_proxy_value< IteratorType > >
nlohmann::detail::external_constructor
nlohmann::detail::external_constructor< value_t::boolean >
nlohmann::detail::external_constructor< value_t::string >
nlohmann::detail::external_constructor< value_t::binary >
nlohmann::detail::external_constructor< value_t::number_float >
nlohmann::detail::external_constructor< value_t::number_unsigned >
nlohmann::detail::external_constructor< value_t::number_integer >
nlohmann::detail::external_constructor< value_t::array >
nlohmann::detail::external_constructor< value_t::object >
nlohmann::detail::to_json_fn
nlohmann::adl_serializer
nlohmann::byte_container_with_subtype
nlohmann::detail::file_input_adapter
nlohmann::detail::input_stream_adapter
nlohmann::detail::iterator_input_adapter
nlohmann::detail::wide_string_input_helper
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 4 >
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 2 >
nlohmann::detail::wide_string_input_adapter
nlohmann::detail::iterator_input_adapter_factory
nlohmann::detail::is_iterator_of_multibyte
nlohmann::detail::iterator_input_adapter_factory< IteratorType, enable_if_t< is_iterator_of_multibyte< IteratorType >::value > >
nlohmann::detail::container_input_adapter_factory_impl::container_input_adapter_factory
nlohmann::detail::container_input_adapter_factory_impl::container_input_adapter_factory< ContainerType, void_t< decltype(begin(std::declval< ContainerType >()), end(std::declval< ContainerType >()))> >
nlohmann::detail::span_input_adapter
nlohmann::json_sax
nlohmann::detail::json_sax_dom_parser
nlohmann::detail::json_sax_dom_callback_parser
nlohmann::detail::json_sax_acceptor
nlohmann::detail::lexer_base
nlohmann::detail::lexer
nlohmann::detail::is_sax
nlohmann::detail::is_sax_static_asserts
nlohmann::detail::binary_reader
nlohmann::detail::parser
nlohmann::detail::primitive_iterator_t
nlohmann::detail::internal_iterator
nlohmann::detail::iteration_proxy
nlohmann::detail::iteration_proxy_value
nlohmann::detail::iter_impl
nlohmann::detail::json_reverse_iterator
nlohmann::json_pointer
nlohmann::detail::json_ref
nlohmann::detail::output_adapter_protocol
nlohmann::detail::output_vector_adapter
nlohmann::detail::output_stream_adapter
nlohmann::detail::output_string_adapter
nlohmann::detail::output_adapter
nlohmann::detail::binary_writer
nlohmann::detail::dtoa_impl::diyfp
nlohmann::detail::dtoa_impl::boundaries
nlohmann::detail::dtoa_impl::cached_power
nlohmann::detail::serializer
nlohmann::ordered_map
nlohmann::basic_json
std::hash< nlohmann::json >
std::less<::nlohmann::detail::value_t >
nlohmann
nlohmann::detail
nlohmann::detail::utility_internal
std
nlohmann::detail::container_input_adapter_factory_impl
nlohmann::detail::dtoa_impl
NLOHMANN_JSON_VERSION_MAJOR
3
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::meta
NLOHMANN_JSON_VERSION_MINOR
9
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::meta
NLOHMANN_JSON_VERSION_PATCH
1
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::meta
JSON_HEDLEY_VERSION
15
JSON_HEDLEY_STRINGIFY_EX
x
#x
JSON_HEDLEY_STRINGIFY
x
JSON_HEDLEY_STRINGIFY_EX
(x)
JSON_HEDLEY_CONCAT_EX
a
b
a##b
JSON_HEDLEY_CONCAT
a
b
JSON_HEDLEY_CONCAT_EX
(a,b)
JSON_HEDLEY_CONCAT3_EX
a
b
c
a##b##c
JSON_HEDLEY_CONCAT3
a
b
c
JSON_HEDLEY_CONCAT3_EX
(a,b,c)
JSON_HEDLEY_VERSION_ENCODE
major
minor
revision
(((major) * 1000000) + ((minor) * 1000) + (revision))
JSON_HEDLEY_VERSION_DECODE_MAJOR
version
((version) / 1000000)
JSON_HEDLEY_VERSION_DECODE_MINOR
version
(((version) % 1000000) / 1000)
JSON_HEDLEY_VERSION_DECODE_REVISION
version
((version) % 1000)
JSON_HEDLEY_GNUC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_MSVC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_INTEL_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_INTEL_CL_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_PGI_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_SUNPRO_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_ARM_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_IBM_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_CL2000_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_CL430_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_ARMCL_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_CL6X_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_CL7X_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TI_CLPRU_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_CRAY_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_IAR_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_TINYC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_DMC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_COMPCERT_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_PELLES_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_MCST_LCC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_GCC_VERSION_CHECK
major
minor
patch
(0)
JSON_HEDLEY_HAS_ATTRIBUTE
attribute
(0)
JSON_HEDLEY_GNUC_HAS_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_CPP_ATTRIBUTE
attribute
(0)
JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
ns
attribute
(0)
JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_BUILTIN
builtin
(0)
JSON_HEDLEY_GNUC_HAS_BUILTIN
builtin
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_BUILTIN
builtin
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_FEATURE
feature
(0)
JSON_HEDLEY_GNUC_HAS_FEATURE
feature
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_FEATURE
feature
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_EXTENSION
extension
(0)
JSON_HEDLEY_GNUC_HAS_EXTENSION
extension
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_EXTENSION
extension
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
attribute
(0)
JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
attribute
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_HAS_WARNING
warning
(0)
JSON_HEDLEY_GNUC_HAS_WARNING
warning
major
minor
patch
JSON_HEDLEY_GNUC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_GCC_HAS_WARNING
warning
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_PRAGMA
value
JSON_HEDLEY_DIAGNOSTIC_PUSH
JSON_HEDLEY_DIAGNOSTIC_POP
JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
x
x
JSON_HEDLEY_CONST_CAST
T
expr
((T) (expr))
JSON_HEDLEY_REINTERPRET_CAST
T
expr
((T) (expr))
JSON_HEDLEY_STATIC_CAST
T
expr
((T) (expr))
JSON_HEDLEY_CPP_CAST
T
expr
(expr)
JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
JSON_HEDLEY_DEPRECATED
since
JSON_HEDLEY_DEPRECATED_FOR
since
replacement
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::accept
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::crend
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_bson
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_cbor
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_msgpack
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_ubjson
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::iterator_wrapper
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::sax_parse
JSON_HEDLEY_UNAVAILABLE
available_since
JSON_HEDLEY_WARN_UNUSED_RESULT
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::accept
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::array
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::binary
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_bson
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_cbor
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_msgpack
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_ubjson
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_allocator
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::to_bson
JSON_HEDLEY_WARN_UNUSED_RESULT_MSG
msg
JSON_HEDLEY_SENTINEL
position
JSON_HEDLEY_NO_RETURN
JSON_HEDLEY_NO_ESCAPE
JSON_HEDLEY_ASSUME
expr
JSON_HEDLEY_STATIC_CAST
(void, expr)
JSON_HEDLEY_UNREACHABLE_RETURN
value
return (value)
JSON_HEDLEY_UNREACHABLE
JSON_HEDLEY_ASSUME
(0)
JSON_HEDLEY_NON_NULL
...
nlohmann::detail::parser< BasicJsonType, InputAdapterType >::accept
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::accept
nlohmann::detail::dtoa_impl::append_exponent
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader
nlohmann::detail::invalid_iterator::create
nlohmann::detail::type_error::create
nlohmann::detail::out_of_range::create
nlohmann::detail::other_error::create
nlohmann::detail::dtoa_impl::format_buffer
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary
nlohmann::detail::dtoa_impl::grisu2
nlohmann::detail::dtoa_impl::grisu2_digit_gen
operator"" _json
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[]
nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::sax_parse
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_comment
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_number
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::strtof
std::swap< nlohmann::json >
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value
nlohmann::detail::output_vector_adapter< CharType >::write_character
nlohmann::detail::output_stream_adapter< CharType >::write_character
nlohmann::detail::output_string_adapter< CharType, StringType >::write_character
JSON_HEDLEY_PRINTF_FORMAT
string_idx
first_to_check
JSON_HEDLEY_CONSTEXPR
JSON_HEDLEY_PREDICT
expr
expected
probability
(JSON_HEDLEY_STATIC_CAST(void, expected), (expr))
JSON_HEDLEY_PREDICT_TRUE
expr
probability
(!!(expr))
JSON_HEDLEY_PREDICT_FALSE
expr
probability
(!!(expr))
JSON_HEDLEY_LIKELY
expr
(!!(expr))
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::get
nlohmann::detail::iterator_input_adapter< IteratorType >::get_character
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_impl
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_ref_impl
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert
nlohmann::detail::iter_impl< BasicJsonType >::key
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::next_byte_in_range
nlohmann::detail::iter_impl< BasicJsonType >::operator*
nlohmann::detail::iter_impl< BasicJsonType >::operator->
nlohmann::detail::iter_impl< BasicJsonType >::operator[]
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[]
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse_internal
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_string
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::unget
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value
JSON_HEDLEY_UNLIKELY
expr
(!!(expr))
nlohmann::json_pointer< BasicJsonType >::array_index
nlohmann::json_pointer< BasicJsonType >::back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json
nlohmann::detail::binary_writer< BasicJsonType, CharType >::calc_bson_entry_header_size
nlohmann::json_pointer< BasicJsonType >::contains
nlohmann::detail::serializer< BasicJsonType >::dump
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace_back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 4 >::fill_buffer
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 2 >::fill_buffer
nlohmann::detail::from_json
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string
nlohmann::detail::input_stream_adapter::get_character
nlohmann::json_pointer< BasicJsonType >::get_checked
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_value
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value
nlohmann::json_pointer< BasicJsonType >::get_unchecked
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_value
nlohmann::detail::iter_impl< BasicJsonType >::operator<
nlohmann::detail::iter_impl< BasicJsonType >::operator==
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::json_pointer< BasicJsonType >::pop_back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse
nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse_internal
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_literal
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_string
nlohmann::json_pointer< BasicJsonType >::split
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::start_array
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::start_array
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::start_object
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::start_object
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof
nlohmann::json_pointer< BasicJsonType >::unflatten
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::update
nlohmann::detail::void
JSON_HEDLEY_UNPREDICTABLE
expr
JSON_HEDLEY_PREDICT
(expr, 1, 0.5)
JSON_HEDLEY_MALLOC
JSON_HEDLEY_PURE
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::lexer
JSON_HEDLEY_CONST
JSON_HEDLEY_PURE
JSON_HEDLEY_RESTRICT
JSON_HEDLEY_INLINE
JSON_HEDLEY_ALWAYS_INLINE
JSON_HEDLEY_INLINE
JSON_HEDLEY_NEVER_INLINE
JSON_HEDLEY_PRIVATE
JSON_HEDLEY_PUBLIC
JSON_HEDLEY_IMPORT
extern
JSON_HEDLEY_NO_THROW
JSON_HEDLEY_FALL_THROUGH
JSON_HEDLEY_RETURNS_NON_NULL
nlohmann::detail::dtoa_impl::append_exponent
nlohmann::detail::dtoa_impl::format_buffer
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::get_token_string
nlohmann::detail::dtoa_impl::grisu2
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::is_errored
JSON_HEDLEY_ARRAY_PARAM
name
JSON_HEDLEY_IS_CONSTANT
expr
(0)
JSON_HEDLEY_REQUIRE_CONSTEXPR
expr
(expr)
JSON_HEDLEY_BEGIN_C_DECLS
JSON_HEDLEY_END_C_DECLS
JSON_HEDLEY_C_DECL
JSON_HEDLEY_STATIC_ASSERT
expr
message
JSON_HEDLEY_NULL
((void*) 0)
JSON_HEDLEY_MESSAGE
msg
JSON_HEDLEY_WARNING
msg
JSON_HEDLEY_MESSAGE
(msg)
JSON_HEDLEY_REQUIRE
expr
JSON_HEDLEY_REQUIRE_MSG
expr
msg
JSON_HEDLEY_FLAGS
JSON_HEDLEY_FLAGS_CAST
T
expr
JSON_HEDLEY_STATIC_CAST
(T, expr)
JSON_HEDLEY_EMPTY_BASES
JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
major
minor
patch
JSON_HEDLEY_GCC_VERSION_CHECK
(major,minor,patch)
JSON_HEDLEY_CLANG_HAS_ATTRIBUTE
attribute
JSON_HEDLEY_HAS_ATTRIBUTE
(attribute)
JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
attribute
JSON_HEDLEY_HAS_CPP_ATTRIBUTE
(attribute)
JSON_HEDLEY_CLANG_HAS_BUILTIN
builtin
JSON_HEDLEY_HAS_BUILTIN
(builtin)
JSON_HEDLEY_CLANG_HAS_FEATURE
feature
JSON_HEDLEY_HAS_FEATURE
(feature)
JSON_HEDLEY_CLANG_HAS_EXTENSION
extension
JSON_HEDLEY_HAS_EXTENSION
(extension)
JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE
attribute
JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
(attribute)
JSON_HEDLEY_CLANG_HAS_WARNING
warning
JSON_HEDLEY_HAS_WARNING
(warning)
JSON_HAS_CPP_11
JSON_THROW
exception
std::abort()
nlohmann::json_pointer< BasicJsonType >::array_index
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at
nlohmann::json_pointer< BasicJsonType >::back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json
nlohmann::detail::binary_writer< BasicJsonType, CharType >::calc_bson_entry_header_size
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::emplace_back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::erase
nlohmann::detail::serializer< BasicJsonType >::for
nlohmann::detail::from_json
nlohmann::json_pointer< BasicJsonType >::get_and_create
nlohmann::detail::get_arithmetic_value
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_binary
nlohmann::json_pointer< BasicJsonType >::get_checked
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_impl
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get_ref_impl
nlohmann::json_pointer< BasicJsonType >::get_unchecked
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_value
nlohmann::detail::iter_impl< BasicJsonType >::key
nlohmann::detail::iter_impl< BasicJsonType >::operator*
nlohmann::detail::iter_impl< BasicJsonType >::operator+=
nlohmann::detail::iter_impl< BasicJsonType >::operator-
nlohmann::detail::iter_impl< BasicJsonType >::operator->
nlohmann::detail::iter_impl< BasicJsonType >::operator<
nlohmann::detail::iter_impl< BasicJsonType >::operator==
nlohmann::detail::iter_impl< BasicJsonType >::operator[]
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[]
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::parse_error
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::parse_error
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::json_pointer< BasicJsonType >::pop_back
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back
nlohmann::json_pointer< BasicJsonType >::split
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::start_array
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::start_array
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::start_object
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::start_object
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::swap
nlohmann::json_pointer< BasicJsonType >::unflatten
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::update
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value
nlohmann::detail::void
nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_bson
nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_bson_unsigned
JSON_TRY
if(true)
nlohmann::json_pointer< BasicJsonType >::array_index
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::assert_invariant
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value
JSON_CATCH
exception
if(false)
nlohmann::json_pointer< BasicJsonType >::array_index
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::assert_invariant
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at
JSON_INTERNAL_CATCH
exception
if(false)
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value
JSON_ASSERT
x
assert(x)
nlohmann::detail::dtoa_impl::append_exponent
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::assert_invariant
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json
nlohmann::detail::binary_writer< BasicJsonType, CharType >::binary_writer
nlohmann::detail::binary_writer< BasicJsonType, CharType >::calc_bson_element_size
nlohmann::detail::dtoa_impl::compute_boundaries
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::create
nlohmann::detail::serializer< BasicJsonType >::dump
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::end_array
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::end_object
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message
nlohmann::detail::serializer< BasicJsonType >::for
nlohmann::detail::dtoa_impl::format_buffer
nlohmann::detail::dtoa_impl::get_cached_power_for_binary_exponent
nlohmann::detail::wide_string_input_adapter< BaseInputAdapter, WideCharType >::get_character
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::get_codepoint
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::get_decimal_point
nlohmann::detail::dtoa_impl::grisu2
nlohmann::detail::dtoa_impl::grisu2_digit_gen
nlohmann::detail::dtoa_impl::grisu2_round
nlohmann::detail::json_sax_dom_parser< BasicJsonType >::handle_value
nlohmann::detail::json_sax_dom_callback_parser< BasicJsonType >::handle_value
nlohmann::detail::hash
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::insert_iterator
nlohmann::detail::iter_impl< BasicJsonType >::iter_impl
nlohmann::detail::iteration_proxy_value< IteratorType >::key
nlohmann::detail::iter_impl< BasicJsonType >::key
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::next_byte_in_range
nlohmann::detail::dtoa_impl::diyfp::normalize
nlohmann::detail::dtoa_impl::diyfp::normalize_to
nlohmann::detail::iter_impl< BasicJsonType >::operator*
nlohmann::detail::iter_impl< BasicJsonType >::operator++
nlohmann::detail::iter_impl< BasicJsonType >::operator+=
nlohmann::detail::iter_impl< BasicJsonType >::operator-
nlohmann::detail::iter_impl< BasicJsonType >::operator--
nlohmann::detail::iter_impl< BasicJsonType >::operator->
nlohmann::detail::iter_impl< BasicJsonType >::operator<
nlohmann::detail::iter_impl< BasicJsonType >::operator==
nlohmann::detail::iter_impl< BasicJsonType >::operator[]
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::operator[]
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch
nlohmann::detail::replace_substring
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse
nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse_internal
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_literal
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_number
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::scan_string
nlohmann::detail::iter_impl< BasicJsonType >::set_end
nlohmann::json_pointer< BasicJsonType >::split
nlohmann::detail::dtoa_impl::diyfp::sub
nlohmann::detail::to_chars
nlohmann::detail::lexer< BasicJsonType, InputAdapterType >::unget
nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_bson_element
nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_ubjson
JSON_PRIVATE_UNLESS_TESTED
private
nlohmann::json_pointer< BasicJsonType >::array_index
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::create
nlohmann::detail::serializer< BasicJsonType >::dump
nlohmann::detail::iter_impl< BasicJsonType >::operator=
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::type_name
nlohmann::detail::iter_impl< BasicJsonType >::value
NLOHMANN_JSON_SERIALIZE_ENUM
ENUM_TYPE
...
template<typename BasicJsonType> \ inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ { \ static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ { \ return ej_pair.first == e; \ }); \ j = ((it != std::end(m)) ? it : std::begin(m))->second; \ } \ template<typename BasicJsonType> \ inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ { \ static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE " must be an enum!"); \ static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [&j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \ { \ return ej_pair.second == j; \ }); \ e = ((it != std::end(m)) ? it : std::begin(m))->first; \ }

macro to briefly define a mapping between an enum and JSON

version 3.4.0

NLOHMANN_BASIC_JSON_TPL_DECLARATION
template<template<typename, typename, typename...> class ObjectType, \ template<typename, typename...> class ArrayType, \ class StringType, class BooleanType, class NumberIntegerType, \ class NumberUnsignedType, class NumberFloatType, \ template<typename> class AllocatorType, \ template<typename, typename = void> class JSONSerializer, \ class BinaryType>
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::merge_patch
nlohmann::detail::json_reverse_iterator< Base >::value
NLOHMANN_BASIC_JSON_TPL
basic_json<ObjectType, ArrayType, StringType, BooleanType, \ NumberIntegerType, NumberUnsignedType, NumberFloatType, \ AllocatorType, JSONSerializer, BinaryType>
NLOHMANN_JSON_EXPAND
x
x
NLOHMANN_JSON_GET_MACRO
_1
_2
_3
_4
_5
_6
_7
_8
_9
_10
_11
_12
_13
_14
_15
_16
_17
_18
_19
_20
_21
_22
_23
_24
_25
_26
_27
_28
_29
_30
_31
_32
_33
_34
_35
_36
_37
_38
_39
_40
_41
_42
_43
_44
_45
_46
_47
_48
_49
_50
_51
_52
_53
_54
_55
_56
_57
_58
_59
_60
_61
_62
_63
_64
NAME
...
NAME
NLOHMANN_JSON_PASTE
...
NLOHMANN_JSON_PASTE2
func
v1
func(v1)
NLOHMANN_JSON_PASTE3
func
v1
v2
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE2(func, v2)
NLOHMANN_JSON_PASTE4
func
v1
v2
v3
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3)
NLOHMANN_JSON_PASTE5
func
v1
v2
v3
v4
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4)
NLOHMANN_JSON_PASTE6
func
v1
v2
v3
v4
v5
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5)
NLOHMANN_JSON_PASTE7
func
v1
v2
v3
v4
v5
v6
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6)
NLOHMANN_JSON_PASTE8
func
v1
v2
v3
v4
v5
v6
v7
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7)
NLOHMANN_JSON_PASTE9
func
v1
v2
v3
v4
v5
v6
v7
v8
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8)
NLOHMANN_JSON_PASTE10
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9)
NLOHMANN_JSON_PASTE11
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10)
NLOHMANN_JSON_PASTE12
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)
NLOHMANN_JSON_PASTE13
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)
NLOHMANN_JSON_PASTE14
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)
NLOHMANN_JSON_PASTE15
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)
NLOHMANN_JSON_PASTE16
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
NLOHMANN_JSON_PASTE17
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)
NLOHMANN_JSON_PASTE18
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
NLOHMANN_JSON_PASTE19
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
NLOHMANN_JSON_PASTE20
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
NLOHMANN_JSON_PASTE21
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
NLOHMANN_JSON_PASTE22
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
NLOHMANN_JSON_PASTE23
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
NLOHMANN_JSON_PASTE24
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23)
NLOHMANN_JSON_PASTE25
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24)
NLOHMANN_JSON_PASTE26
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25)
NLOHMANN_JSON_PASTE27
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)
NLOHMANN_JSON_PASTE28
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27)
NLOHMANN_JSON_PASTE29
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28)
NLOHMANN_JSON_PASTE30
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29)
NLOHMANN_JSON_PASTE31
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30)
NLOHMANN_JSON_PASTE32
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31)
NLOHMANN_JSON_PASTE33
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32)
NLOHMANN_JSON_PASTE34
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33)
NLOHMANN_JSON_PASTE35
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34)
NLOHMANN_JSON_PASTE36
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35)
NLOHMANN_JSON_PASTE37
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36)
NLOHMANN_JSON_PASTE38
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)
NLOHMANN_JSON_PASTE39
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38)
NLOHMANN_JSON_PASTE40
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39)
NLOHMANN_JSON_PASTE41
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40)
NLOHMANN_JSON_PASTE42
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41)
NLOHMANN_JSON_PASTE43
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42)
NLOHMANN_JSON_PASTE44
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43)
NLOHMANN_JSON_PASTE45
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)
NLOHMANN_JSON_PASTE46
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45)
NLOHMANN_JSON_PASTE47
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46)
NLOHMANN_JSON_PASTE48
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47)
NLOHMANN_JSON_PASTE49
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48)
NLOHMANN_JSON_PASTE50
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49)
NLOHMANN_JSON_PASTE51
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)
NLOHMANN_JSON_PASTE52
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51)
NLOHMANN_JSON_PASTE53
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52)
NLOHMANN_JSON_PASTE54
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53)
NLOHMANN_JSON_PASTE55
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54)
NLOHMANN_JSON_PASTE56
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55)
NLOHMANN_JSON_PASTE57
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56)
NLOHMANN_JSON_PASTE58
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57)
NLOHMANN_JSON_PASTE59
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58)
NLOHMANN_JSON_PASTE60
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
v59
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59)
NLOHMANN_JSON_PASTE61
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
v59
v60
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60)
NLOHMANN_JSON_PASTE62
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
v59
v60
v61
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61)
NLOHMANN_JSON_PASTE63
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
v59
v60
v61
v62
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62)
NLOHMANN_JSON_PASTE64
func
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v30
v31
v32
v33
v34
v35
v36
v37
v38
v39
v40
v41
v42
v43
v44
v45
v46
v47
v48
v49
v50
v51
v52
v53
v54
v55
v56
v57
v58
v59
v60
v61
v62
v63
NLOHMANN_JSON_PASTE2
(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63)
NLOHMANN_JSON_TO
v1
nlohmann_json_j[#v1] = nlohmann_json_t.v1;
NLOHMANN_JSON_FROM
v1
nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1);
NLOHMANN_DEFINE_TYPE_INTRUSIVE
Type
...
friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }

macro

version 3.9.0

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE
Type
...
inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }

macro

version 3.9.0

JSON_USE_IMPLICIT_CONVERSIONS
1
JSON_EXPLICIT
INCLUDE_NLOHMANN_JSON_FWD_HPP_
nlohmann::json nlohmann::json operator"" _json (const char *s, std::size_t n) operator"" _json const char * s std::size_t n

user-defined string literal for JSON values

This operator implements a user-defined string literal for JSON objects. It can be used by adding `"_json"` to a string literal and returns a JSON object if no parse error occurred.

s

a string representation of a JSON object

n

the length of string s

a JSON object

version 1.0.0

JSON_HEDLEY_NON_NULL
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse
nlohmann::json::json_pointer nlohmann::json::json_pointer operator"" _json_pointer (const char *s, std::size_t n) operator"" _json_pointer const char * s std::size_t n

user-defined string literal for JSON pointer

This operator implements a user-defined string literal for JSON Pointers. It can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer object if no parse error occurred.

s

a string representation of a JSON Pointer

n

the length of string s

a JSON pointer object

version 2.0.0

nlohmann::detail::string

    /*
    _________________
    __||__||||JSONforModernC++
    |||__||||||version3.9.1
    |_____|_____|_____|_|___|https://github.com/nlohmann/json

    LicensedundertheMITLicense<http://opensource.org/licenses/MIT>.
    SPDX-License-Identifier:MIT
    Copyright(c)2013-2019NielsLohmann<http://nlohmann.me>.

    Permissionisherebygranted,freeofcharge,toanypersonobtainingacopy
    ofthissoftwareandassociateddocumentationfiles(the"Software"),todeal
    intheSoftwarewithoutrestriction,includingwithoutlimitationtherights
    touse,copy,modify,merge,publish,distribute,sublicense,and/orsell
    copiesoftheSoftware,andtopermitpersonstowhomtheSoftwareis
    furnishedtodoso,subjecttothefollowingconditions:

    Theabovecopyrightnoticeandthispermissionnoticeshallbeincludedinall
    copiesorsubstantialportionsoftheSoftware.

    THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EXPRESSOR
    IMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMERCHANTABILITY,
    FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT.INNOEVENTSHALLTHE
    AUTHORSORCOPYRIGHTHOLDERSBELIABLEFORANYCLAIM,DAMAGESOROTHER
    LIABILITY,WHETHERINANACTIONOFCONTRACT,TORTOROTHERWISE,ARISINGFROM,
    OUTOFORINCONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHE
    SOFTWARE.
    */

    #ifndefINCLUDE_NLOHMANN_JSON_HPP_
    #defineINCLUDE_NLOHMANN_JSON_HPP_

    #defineNLOHMANN_JSON_VERSION_MAJOR3
    #defineNLOHMANN_JSON_VERSION_MINOR9
    #defineNLOHMANN_JSON_VERSION_PATCH1

    #include<algorithm>//all_of,find,for_each
    #include<cstddef>//nullptr_t,ptrdiff_t,size_t
    #include<functional>//hash,less
    #include<initializer_list>//initializer_list
    #include<iosfwd>//istream,ostream
    #include<iterator>//random_access_iterator_tag
    #include<memory>//unique_ptr
    #include<numeric>//accumulate
    #include<string>//string,stoi,to_string
    #include<utility>//declval,forward,move,pair,swap
    #include<vector>//vector

    //#include<nlohmann/adl_serializer.hpp>

    #include<type_traits>
    #include<utility>

    //#include<nlohmann/detail/conversions/from_json.hpp>

    #include<algorithm>//transform
    #include<array>//array
    #include<forward_list>//forward_list
    #include<iterator>//inserter,front_inserter,end
    #include<map>//map
    #include<string>//string
    #include<tuple>//tuple,make_tuple
    #include<type_traits>//is_arithmetic,is_same,is_enum,underlying_type,is_convertible
    #include<unordered_map>//unordered_map
    #include<utility>//pair,declval
    #include<valarray>//valarray

    //#include<nlohmann/detail/exceptions.hpp>

    #include<exception>//exception
    #include<stdexcept>//runtime_error
    #include<string>//to_string
    #include<vector>//vector

    //#include<nlohmann/detail/value_t.hpp>

    #include<array>//array
    #include<cstddef>//size_t
    #include<cstdint>//uint8_t
    #include<string>//string

    namespacenlohmann
    {
    namespacedetail
    {
    //JSONtypeenumeration//

    enumclassvalue_t:std::uint8_t
    {
    null,
    object,
    array,
    string,
    boolean,
    number_integer,
    number_unsigned,
    number_float,
    binary,
    discarded
    };

    inlinebooloperator<(constvalue_tlhs,constvalue_trhs)noexcept
    {
    staticconstexprstd::array<std::uint8_t,9>order={{
    0/*null*/,3/*object*/,4/*array*/,5/*string*/,
    1/*boolean*/,2/*integer*/,2/*unsigned*/,2/*float*/,
    6/*binary*/
    }
    };

    constautol_index=static_cast<std::size_t>(lhs);
    constautor_index=static_cast<std::size_t>(rhs);
    returnl_index<order.size()&&r_index<order.size()&&order[l_index]<order[r_index];
    }
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/string_escape.hpp>

    #include<string>
    //#include<nlohmann/detail/macro_scope.hpp>

    #include<utility>//pair
    //#include<nlohmann/thirdparty/hedley/hedley.hpp>

    /*Hedley-https://nemequ.github.io/hedley
    *CreatedbyEvanNemerson<evan@nemerson.com>
    *
    *Totheextentpossibleunderlaw,theauthor(s)havededicatedall
    *copyrightandrelatedandneighboringrightstothissoftwareto
    *thepublicdomainworldwide.Thissoftwareisdistributedwithout
    *anywarranty.
    *
    *Fordetails,see<http://creativecommons.org/publicdomain/zero/1.0/>.
    *SPDX-License-Identifier:CC0-1.0
    */

    #if!defined(JSON_HEDLEY_VERSION)||(JSON_HEDLEY_VERSION<15)
    #ifdefined(JSON_HEDLEY_VERSION)
    #undefJSON_HEDLEY_VERSION
    #endif
    #defineJSON_HEDLEY_VERSION15

    #ifdefined(JSON_HEDLEY_STRINGIFY_EX)
    #undefJSON_HEDLEY_STRINGIFY_EX
    #endif
    #defineJSON_HEDLEY_STRINGIFY_EX(x)#x

    #ifdefined(JSON_HEDLEY_STRINGIFY)
    #undefJSON_HEDLEY_STRINGIFY
    #endif
    #defineJSON_HEDLEY_STRINGIFY(x)JSON_HEDLEY_STRINGIFY_EX(x)

    #ifdefined(JSON_HEDLEY_CONCAT_EX)
    #undefJSON_HEDLEY_CONCAT_EX
    #endif
    #defineJSON_HEDLEY_CONCAT_EX(a,b)a##b

    #ifdefined(JSON_HEDLEY_CONCAT)
    #undefJSON_HEDLEY_CONCAT
    #endif
    #defineJSON_HEDLEY_CONCAT(a,b)JSON_HEDLEY_CONCAT_EX(a,b)

    #ifdefined(JSON_HEDLEY_CONCAT3_EX)
    #undefJSON_HEDLEY_CONCAT3_EX
    #endif
    #defineJSON_HEDLEY_CONCAT3_EX(a,b,c)a##b##c

    #ifdefined(JSON_HEDLEY_CONCAT3)
    #undefJSON_HEDLEY_CONCAT3
    #endif
    #defineJSON_HEDLEY_CONCAT3(a,b,c)JSON_HEDLEY_CONCAT3_EX(a,b,c)

    #ifdefined(JSON_HEDLEY_VERSION_ENCODE)
    #undefJSON_HEDLEY_VERSION_ENCODE
    #endif
    #defineJSON_HEDLEY_VERSION_ENCODE(major,minor,revision)(((major)*1000000)+((minor)*1000)+(revision))

    #ifdefined(JSON_HEDLEY_VERSION_DECODE_MAJOR)
    #undefJSON_HEDLEY_VERSION_DECODE_MAJOR
    #endif
    #defineJSON_HEDLEY_VERSION_DECODE_MAJOR(version)((version)/1000000)

    #ifdefined(JSON_HEDLEY_VERSION_DECODE_MINOR)
    #undefJSON_HEDLEY_VERSION_DECODE_MINOR
    #endif
    #defineJSON_HEDLEY_VERSION_DECODE_MINOR(version)(((version)%1000000)/1000)

    #ifdefined(JSON_HEDLEY_VERSION_DECODE_REVISION)
    #undefJSON_HEDLEY_VERSION_DECODE_REVISION
    #endif
    #defineJSON_HEDLEY_VERSION_DECODE_REVISION(version)((version)%1000)

    #ifdefined(JSON_HEDLEY_GNUC_VERSION)
    #undefJSON_HEDLEY_GNUC_VERSION
    #endif
    #ifdefined(__GNUC__)&&defined(__GNUC_PATCHLEVEL__)
    #defineJSON_HEDLEY_GNUC_VERSIONJSON_HEDLEY_VERSION_ENCODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
    #elifdefined(__GNUC__)
    #defineJSON_HEDLEY_GNUC_VERSIONJSON_HEDLEY_VERSION_ENCODE(__GNUC__,__GNUC_MINOR__,0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_VERSION_CHECK)
    #undefJSON_HEDLEY_GNUC_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_GNUC_VERSION)
    #defineJSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_GNUC_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_MSVC_VERSION)
    #undefJSON_HEDLEY_MSVC_VERSION
    #endif
    #ifdefined(_MSC_FULL_VER)&&(_MSC_FULL_VER>=140000000)&&!defined(__ICL)
    #defineJSON_HEDLEY_MSVC_VERSIONJSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER/10000000,(_MSC_FULL_VER%10000000)/100000,(_MSC_FULL_VER%100000)/100)
    #elifdefined(_MSC_FULL_VER)&&!defined(__ICL)
    #defineJSON_HEDLEY_MSVC_VERSIONJSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER/1000000,(_MSC_FULL_VER%1000000)/10000,(_MSC_FULL_VER%10000)/10)
    #elifdefined(_MSC_VER)&&!defined(__ICL)
    #defineJSON_HEDLEY_MSVC_VERSIONJSON_HEDLEY_VERSION_ENCODE(_MSC_VER/100,_MSC_VER%100,0)
    #endif

    #ifdefined(JSON_HEDLEY_MSVC_VERSION_CHECK)
    #undefJSON_HEDLEY_MSVC_VERSION_CHECK
    #endif
    #if!defined(JSON_HEDLEY_MSVC_VERSION)
    #defineJSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch)(0)
    #elifdefined(_MSC_VER)&&(_MSC_VER>=1400)
    #defineJSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch)(_MSC_FULL_VER>=((major*10000000)+(minor*100000)+(patch)))
    #elifdefined(_MSC_VER)&&(_MSC_VER>=1200)
    #defineJSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch)(_MSC_FULL_VER>=((major*1000000)+(minor*10000)+(patch)))
    #else
    #defineJSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch)(_MSC_VER>=((major*100)+(minor)))
    #endif

    #ifdefined(JSON_HEDLEY_INTEL_VERSION)
    #undefJSON_HEDLEY_INTEL_VERSION
    #endif
    #ifdefined(__INTEL_COMPILER)&&defined(__INTEL_COMPILER_UPDATE)&&!defined(__ICL)
    #defineJSON_HEDLEY_INTEL_VERSIONJSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER/100,__INTEL_COMPILER%100,__INTEL_COMPILER_UPDATE)
    #elifdefined(__INTEL_COMPILER)&&!defined(__ICL)
    #defineJSON_HEDLEY_INTEL_VERSIONJSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER/100,__INTEL_COMPILER%100,0)
    #endif

    #ifdefined(JSON_HEDLEY_INTEL_VERSION_CHECK)
    #undefJSON_HEDLEY_INTEL_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_INTEL_VERSION)
    #defineJSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_INTEL_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_INTEL_CL_VERSION)
    #undefJSON_HEDLEY_INTEL_CL_VERSION
    #endif
    #ifdefined(__INTEL_COMPILER)&&defined(__INTEL_COMPILER_UPDATE)&&defined(__ICL)
    #defineJSON_HEDLEY_INTEL_CL_VERSIONJSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER,__INTEL_COMPILER_UPDATE,0)
    #endif

    #ifdefined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK)
    #undefJSON_HEDLEY_INTEL_CL_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_INTEL_CL_VERSION)
    #defineJSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_INTEL_CL_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_PGI_VERSION)
    #undefJSON_HEDLEY_PGI_VERSION
    #endif
    #ifdefined(__PGI)&&defined(__PGIC__)&&defined(__PGIC_MINOR__)&&defined(__PGIC_PATCHLEVEL__)
    #defineJSON_HEDLEY_PGI_VERSIONJSON_HEDLEY_VERSION_ENCODE(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__)
    #endif

    #ifdefined(JSON_HEDLEY_PGI_VERSION_CHECK)
    #undefJSON_HEDLEY_PGI_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_PGI_VERSION)
    #defineJSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_PGI_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_SUNPRO_VERSION)
    #undefJSON_HEDLEY_SUNPRO_VERSION
    #endif
    #ifdefined(__SUNPRO_C)&&(__SUNPRO_C>0x1000)
    #defineJSON_HEDLEY_SUNPRO_VERSIONJSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C>>16)&0xf)*10)+((__SUNPRO_C>>12)&0xf),(((__SUNPRO_C>>8)&0xf)*10)+((__SUNPRO_C>>4)&0xf),(__SUNPRO_C&0xf)*10)
    #elifdefined(__SUNPRO_C)
    #defineJSON_HEDLEY_SUNPRO_VERSIONJSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C>>8)&0xf,(__SUNPRO_C>>4)&0xf,(__SUNPRO_C)&0xf)
    #elifdefined(__SUNPRO_CC)&&(__SUNPRO_CC>0x1000)
    #defineJSON_HEDLEY_SUNPRO_VERSIONJSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC>>16)&0xf)*10)+((__SUNPRO_CC>>12)&0xf),(((__SUNPRO_CC>>8)&0xf)*10)+((__SUNPRO_CC>>4)&0xf),(__SUNPRO_CC&0xf)*10)
    #elifdefined(__SUNPRO_CC)
    #defineJSON_HEDLEY_SUNPRO_VERSIONJSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC>>8)&0xf,(__SUNPRO_CC>>4)&0xf,(__SUNPRO_CC)&0xf)
    #endif

    #ifdefined(JSON_HEDLEY_SUNPRO_VERSION_CHECK)
    #undefJSON_HEDLEY_SUNPRO_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_SUNPRO_VERSION)
    #defineJSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_SUNPRO_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
    #undefJSON_HEDLEY_EMSCRIPTEN_VERSION
    #endif
    #ifdefined(__EMSCRIPTEN__)
    #defineJSON_HEDLEY_EMSCRIPTEN_VERSIONJSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__,__EMSCRIPTEN_minor__,__EMSCRIPTEN_tiny__)
    #endif

    #ifdefined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)
    #undefJSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_EMSCRIPTEN_VERSION)
    #defineJSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_EMSCRIPTEN_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_ARM_VERSION)
    #undefJSON_HEDLEY_ARM_VERSION
    #endif
    #ifdefined(__CC_ARM)&&defined(__ARMCOMPILER_VERSION)
    #defineJSON_HEDLEY_ARM_VERSIONJSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION/1000000,(__ARMCOMPILER_VERSION%1000000)/10000,(__ARMCOMPILER_VERSION%10000)/100)
    #elifdefined(__CC_ARM)&&defined(__ARMCC_VERSION)
    #defineJSON_HEDLEY_ARM_VERSIONJSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION/1000000,(__ARMCC_VERSION%1000000)/10000,(__ARMCC_VERSION%10000)/100)
    #endif

    #ifdefined(JSON_HEDLEY_ARM_VERSION_CHECK)
    #undefJSON_HEDLEY_ARM_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_ARM_VERSION)
    #defineJSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_ARM_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_IBM_VERSION)
    #undefJSON_HEDLEY_IBM_VERSION
    #endif
    #ifdefined(__ibmxl__)
    #defineJSON_HEDLEY_IBM_VERSIONJSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__,__ibmxl_release__,__ibmxl_modification__)
    #elifdefined(__xlC__)&&defined(__xlC_ver__)
    #defineJSON_HEDLEY_IBM_VERSIONJSON_HEDLEY_VERSION_ENCODE(__xlC__>>8,__xlC__&0xff,(__xlC_ver__>>8)&0xff)
    #elifdefined(__xlC__)
    #defineJSON_HEDLEY_IBM_VERSIONJSON_HEDLEY_VERSION_ENCODE(__xlC__>>8,__xlC__&0xff,0)
    #endif

    #ifdefined(JSON_HEDLEY_IBM_VERSION_CHECK)
    #undefJSON_HEDLEY_IBM_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_IBM_VERSION)
    #defineJSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_IBM_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_VERSION)
    #undefJSON_HEDLEY_TI_VERSION
    #endif
    #if\
    defined(__TI_COMPILER_VERSION__)&&\
    (\
    defined(__TMS470__)||defined(__TI_ARM__)||\
    defined(__MSP430__)||\
    defined(__TMS320C2000__)\
    )
    #if(__TI_COMPILER_VERSION__>=16000000)
    #defineJSON_HEDLEY_TI_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif
    #endif

    #ifdefined(JSON_HEDLEY_TI_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_VERSION)
    #defineJSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL2000_VERSION)
    #undefJSON_HEDLEY_TI_CL2000_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&defined(__TMS320C2000__)
    #defineJSON_HEDLEY_TI_CL2000_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_CL2000_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_CL2000_VERSION)
    #defineJSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_CL2000_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL430_VERSION)
    #undefJSON_HEDLEY_TI_CL430_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&defined(__MSP430__)
    #defineJSON_HEDLEY_TI_CL430_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL430_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_CL430_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_CL430_VERSION)
    #defineJSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_CL430_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_ARMCL_VERSION)
    #undefJSON_HEDLEY_TI_ARMCL_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&(defined(__TMS470__)||defined(__TI_ARM__))
    #defineJSON_HEDLEY_TI_ARMCL_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_ARMCL_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_ARMCL_VERSION)
    #defineJSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_ARMCL_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL6X_VERSION)
    #undefJSON_HEDLEY_TI_CL6X_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&defined(__TMS320C6X__)
    #defineJSON_HEDLEY_TI_CL6X_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_CL6X_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_CL6X_VERSION)
    #defineJSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_CL6X_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL7X_VERSION)
    #undefJSON_HEDLEY_TI_CL7X_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&defined(__C7000__)
    #defineJSON_HEDLEY_TI_CL7X_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_CL7X_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_CL7X_VERSION)
    #defineJSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_CL7X_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TI_CLPRU_VERSION)
    #undefJSON_HEDLEY_TI_CLPRU_VERSION
    #endif
    #ifdefined(__TI_COMPILER_VERSION__)&&defined(__PRU__)
    #defineJSON_HEDLEY_TI_CLPRU_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__/1000000,(__TI_COMPILER_VERSION__%1000000)/1000,(__TI_COMPILER_VERSION__%1000))
    #endif

    #ifdefined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK)
    #undefJSON_HEDLEY_TI_CLPRU_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TI_CLPRU_VERSION)
    #defineJSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TI_CLPRU_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_CRAY_VERSION)
    #undefJSON_HEDLEY_CRAY_VERSION
    #endif
    #ifdefined(_CRAYC)
    #ifdefined(_RELEASE_PATCHLEVEL)
    #defineJSON_HEDLEY_CRAY_VERSIONJSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR,_RELEASE_MINOR,_RELEASE_PATCHLEVEL)
    #else
    #defineJSON_HEDLEY_CRAY_VERSIONJSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR,_RELEASE_MINOR,0)
    #endif
    #endif

    #ifdefined(JSON_HEDLEY_CRAY_VERSION_CHECK)
    #undefJSON_HEDLEY_CRAY_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_CRAY_VERSION)
    #defineJSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_CRAY_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_IAR_VERSION)
    #undefJSON_HEDLEY_IAR_VERSION
    #endif
    #ifdefined(__IAR_SYSTEMS_ICC__)
    #if__VER__>1000
    #defineJSON_HEDLEY_IAR_VERSIONJSON_HEDLEY_VERSION_ENCODE((__VER__/1000000),((__VER__/1000)%1000),(__VER__%1000))
    #else
    #defineJSON_HEDLEY_IAR_VERSIONJSON_HEDLEY_VERSION_ENCODE(__VER__/100,__VER__%100,0)
    #endif
    #endif

    #ifdefined(JSON_HEDLEY_IAR_VERSION_CHECK)
    #undefJSON_HEDLEY_IAR_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_IAR_VERSION)
    #defineJSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_IAR_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_TINYC_VERSION)
    #undefJSON_HEDLEY_TINYC_VERSION
    #endif
    #ifdefined(__TINYC__)
    #defineJSON_HEDLEY_TINYC_VERSIONJSON_HEDLEY_VERSION_ENCODE(__TINYC__/1000,(__TINYC__/100)%10,__TINYC__%100)
    #endif

    #ifdefined(JSON_HEDLEY_TINYC_VERSION_CHECK)
    #undefJSON_HEDLEY_TINYC_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_TINYC_VERSION)
    #defineJSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_TINYC_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_DMC_VERSION)
    #undefJSON_HEDLEY_DMC_VERSION
    #endif
    #ifdefined(__DMC__)
    #defineJSON_HEDLEY_DMC_VERSIONJSON_HEDLEY_VERSION_ENCODE(__DMC__>>8,(__DMC__>>4)&0xf,__DMC__&0xf)
    #endif

    #ifdefined(JSON_HEDLEY_DMC_VERSION_CHECK)
    #undefJSON_HEDLEY_DMC_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_DMC_VERSION)
    #defineJSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_DMC_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_COMPCERT_VERSION)
    #undefJSON_HEDLEY_COMPCERT_VERSION
    #endif
    #ifdefined(__COMPCERT_VERSION__)
    #defineJSON_HEDLEY_COMPCERT_VERSIONJSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__/10000,(__COMPCERT_VERSION__/100)%100,__COMPCERT_VERSION__%100)
    #endif

    #ifdefined(JSON_HEDLEY_COMPCERT_VERSION_CHECK)
    #undefJSON_HEDLEY_COMPCERT_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_COMPCERT_VERSION)
    #defineJSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_COMPCERT_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_PELLES_VERSION)
    #undefJSON_HEDLEY_PELLES_VERSION
    #endif
    #ifdefined(__POCC__)
    #defineJSON_HEDLEY_PELLES_VERSIONJSON_HEDLEY_VERSION_ENCODE(__POCC__/100,__POCC__%100,0)
    #endif

    #ifdefined(JSON_HEDLEY_PELLES_VERSION_CHECK)
    #undefJSON_HEDLEY_PELLES_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_PELLES_VERSION)
    #defineJSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_PELLES_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_MCST_LCC_VERSION)
    #undefJSON_HEDLEY_MCST_LCC_VERSION
    #endif
    #ifdefined(__LCC__)&&defined(__LCC_MINOR__)
    #defineJSON_HEDLEY_MCST_LCC_VERSIONJSON_HEDLEY_VERSION_ENCODE(__LCC__/100,__LCC__%100,__LCC_MINOR__)
    #endif

    #ifdefined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK)
    #undefJSON_HEDLEY_MCST_LCC_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_MCST_LCC_VERSION)
    #defineJSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_MCST_LCC_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_VERSION)
    #undefJSON_HEDLEY_GCC_VERSION
    #endif
    #if\
    defined(JSON_HEDLEY_GNUC_VERSION)&&\
    !defined(__clang__)&&\
    !defined(JSON_HEDLEY_INTEL_VERSION)&&\
    !defined(JSON_HEDLEY_PGI_VERSION)&&\
    !defined(JSON_HEDLEY_ARM_VERSION)&&\
    !defined(JSON_HEDLEY_CRAY_VERSION)&&\
    !defined(JSON_HEDLEY_TI_VERSION)&&\
    !defined(JSON_HEDLEY_TI_ARMCL_VERSION)&&\
    !defined(JSON_HEDLEY_TI_CL430_VERSION)&&\
    !defined(JSON_HEDLEY_TI_CL2000_VERSION)&&\
    !defined(JSON_HEDLEY_TI_CL6X_VERSION)&&\
    !defined(JSON_HEDLEY_TI_CL7X_VERSION)&&\
    !defined(JSON_HEDLEY_TI_CLPRU_VERSION)&&\
    !defined(__COMPCERT__)&&\
    !defined(JSON_HEDLEY_MCST_LCC_VERSION)
    #defineJSON_HEDLEY_GCC_VERSIONJSON_HEDLEY_GNUC_VERSION
    #endif

    #ifdefined(JSON_HEDLEY_GCC_VERSION_CHECK)
    #undefJSON_HEDLEY_GCC_VERSION_CHECK
    #endif
    #ifdefined(JSON_HEDLEY_GCC_VERSION)
    #defineJSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)(JSON_HEDLEY_GCC_VERSION>=JSON_HEDLEY_VERSION_ENCODE(major,minor,patch))
    #else
    #defineJSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)(0)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_ATTRIBUTE)
    #undefJSON_HEDLEY_HAS_ATTRIBUTE
    #endif
    #if\
    defined(__has_attribute)&&\
    (\
    (!defined(JSON_HEDLEY_IAR_VERSION)||JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9))\
    )
    #defineJSON_HEDLEY_HAS_ATTRIBUTE(attribute)__has_attribute(attribute)
    #else
    #defineJSON_HEDLEY_HAS_ATTRIBUTE(attribute)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)
    #undefJSON_HEDLEY_GNUC_HAS_ATTRIBUTE
    #endif
    #ifdefined(__has_attribute)
    #defineJSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE)
    #undefJSON_HEDLEY_GCC_HAS_ATTRIBUTE
    #endif
    #ifdefined(__has_attribute)
    #defineJSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
    #else
    #defineJSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE)
    #undefJSON_HEDLEY_HAS_CPP_ATTRIBUTE
    #endif
    #if\
    defined(__has_cpp_attribute)&&\
    defined(__cplusplus)&&\
    (!defined(JSON_HEDLEY_SUNPRO_VERSION)||JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))
    #defineJSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)__has_cpp_attribute(attribute)
    #else
    #defineJSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)(0)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS)
    #undefJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
    #endif
    #if!defined(__cplusplus)||!defined(__has_cpp_attribute)
    #defineJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute)(0)
    #elif\
    !defined(JSON_HEDLEY_PGI_VERSION)&&\
    !defined(JSON_HEDLEY_IAR_VERSION)&&\
    (!defined(JSON_HEDLEY_SUNPRO_VERSION)||JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))&&\
    (!defined(JSON_HEDLEY_MSVC_VERSION)||JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0))
    #defineJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute)JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)
    #else
    #defineJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)
    #undefJSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
    #endif
    #ifdefined(__has_cpp_attribute)&&defined(__cplusplus)
    #defineJSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch)__has_cpp_attribute(attribute)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)
    #undefJSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
    #endif
    #ifdefined(__has_cpp_attribute)&&defined(__cplusplus)
    #defineJSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch)__has_cpp_attribute(attribute)
    #else
    #defineJSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_BUILTIN)
    #undefJSON_HEDLEY_HAS_BUILTIN
    #endif
    #ifdefined(__has_builtin)
    #defineJSON_HEDLEY_HAS_BUILTIN(builtin)__has_builtin(builtin)
    #else
    #defineJSON_HEDLEY_HAS_BUILTIN(builtin)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_BUILTIN)
    #undefJSON_HEDLEY_GNUC_HAS_BUILTIN
    #endif
    #ifdefined(__has_builtin)
    #defineJSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch)__has_builtin(builtin)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_BUILTIN)
    #undefJSON_HEDLEY_GCC_HAS_BUILTIN
    #endif
    #ifdefined(__has_builtin)
    #defineJSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch)__has_builtin(builtin)
    #else
    #defineJSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_FEATURE)
    #undefJSON_HEDLEY_HAS_FEATURE
    #endif
    #ifdefined(__has_feature)
    #defineJSON_HEDLEY_HAS_FEATURE(feature)__has_feature(feature)
    #else
    #defineJSON_HEDLEY_HAS_FEATURE(feature)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_FEATURE)
    #undefJSON_HEDLEY_GNUC_HAS_FEATURE
    #endif
    #ifdefined(__has_feature)
    #defineJSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch)__has_feature(feature)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_FEATURE)
    #undefJSON_HEDLEY_GCC_HAS_FEATURE
    #endif
    #ifdefined(__has_feature)
    #defineJSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch)__has_feature(feature)
    #else
    #defineJSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_EXTENSION)
    #undefJSON_HEDLEY_HAS_EXTENSION
    #endif
    #ifdefined(__has_extension)
    #defineJSON_HEDLEY_HAS_EXTENSION(extension)__has_extension(extension)
    #else
    #defineJSON_HEDLEY_HAS_EXTENSION(extension)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_EXTENSION)
    #undefJSON_HEDLEY_GNUC_HAS_EXTENSION
    #endif
    #ifdefined(__has_extension)
    #defineJSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch)__has_extension(extension)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_EXTENSION)
    #undefJSON_HEDLEY_GCC_HAS_EXTENSION
    #endif
    #ifdefined(__has_extension)
    #defineJSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch)__has_extension(extension)
    #else
    #defineJSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)
    #undefJSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
    #endif
    #ifdefined(__has_declspec_attribute)
    #defineJSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)__has_declspec_attribute(attribute)
    #else
    #defineJSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)
    #undefJSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
    #endif
    #ifdefined(__has_declspec_attribute)
    #defineJSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch)__has_declspec_attribute(attribute)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)
    #undefJSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
    #endif
    #ifdefined(__has_declspec_attribute)
    #defineJSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch)__has_declspec_attribute(attribute)
    #else
    #defineJSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_HAS_WARNING)
    #undefJSON_HEDLEY_HAS_WARNING
    #endif
    #ifdefined(__has_warning)
    #defineJSON_HEDLEY_HAS_WARNING(warning)__has_warning(warning)
    #else
    #defineJSON_HEDLEY_HAS_WARNING(warning)(0)
    #endif

    #ifdefined(JSON_HEDLEY_GNUC_HAS_WARNING)
    #undefJSON_HEDLEY_GNUC_HAS_WARNING
    #endif
    #ifdefined(__has_warning)
    #defineJSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch)__has_warning(warning)
    #else
    #defineJSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch)JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_GCC_HAS_WARNING)
    #undefJSON_HEDLEY_GCC_HAS_WARNING
    #endif
    #ifdefined(__has_warning)
    #defineJSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch)__has_warning(warning)
    #else
    #defineJSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #if\
    (defined(__STDC_VERSION__)&&(__STDC_VERSION__>=199901L))||\
    defined(__clang__)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1)||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)||\
    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0)||\
    (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)&&defined(__C99_PRAGMA_OPERATOR))
    #defineJSON_HEDLEY_PRAGMA(value)_Pragma(#value)
    #elifJSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
    #defineJSON_HEDLEY_PRAGMA(value)__pragma(value)
    #else
    #defineJSON_HEDLEY_PRAGMA(value)
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_PUSH)
    #undefJSON_HEDLEY_DIAGNOSTIC_PUSH
    #endif
    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_POP)
    #undefJSON_HEDLEY_DIAGNOSTIC_POP
    #endif
    #ifdefined(__clang__)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("clangdiagnosticpush")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("clangdiagnosticpop")
    #elifJSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("warning(push)")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("warning(pop)")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("GCCdiagnosticpush")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("GCCdiagnosticpop")
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH__pragma(warning(push))
    #defineJSON_HEDLEY_DIAGNOSTIC_POP__pragma(warning(pop))
    #elifJSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("push")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("pop")
    #elif\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("diag_push")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("diag_pop")
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH_Pragma("warning(push)")
    #defineJSON_HEDLEY_DIAGNOSTIC_POP_Pragma("warning(pop)")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_PUSH
    #defineJSON_HEDLEY_DIAGNOSTIC_POP
    #endif

    /*JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_isfor
    HEDLEYINTERNALUSEONLY.APIsubjecttochangewithoutnotice.*/
    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
    #endif
    #ifdefined(__cplusplus)
    #ifJSON_HEDLEY_HAS_WARNING("-Wc++98-compat")
    #ifJSON_HEDLEY_HAS_WARNING("-Wc++17-extensions")
    #ifJSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wc++98-compat\"")\
    _Pragma("clangdiagnosticignored\"-Wc++17-extensions\"")\
    _Pragma("clangdiagnosticignored\"-Wc++1z-extensions\"")\
    xpr\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wc++98-compat\"")\
    _Pragma("clangdiagnosticignored\"-Wc++17-extensions\"")\
    xpr\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #endif
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wc++98-compat\"")\
    xpr\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #endif
    #endif
    #endif
    #if!defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x)x
    #endif

    #ifdefined(JSON_HEDLEY_CONST_CAST)
    #undefJSON_HEDLEY_CONST_CAST
    #endif
    #ifdefined(__cplusplus)
    #defineJSON_HEDLEY_CONST_CAST(T,expr)(const_cast<T>(expr))
    #elif\
    JSON_HEDLEY_HAS_WARNING("-Wcast-qual")||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_CONST_CAST(T,expr)(__extension__({\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\
    ((T)(expr));\
    JSON_HEDLEY_DIAGNOSTIC_POP\
    }))
    #else
    #defineJSON_HEDLEY_CONST_CAST(T,expr)((T)(expr))
    #endif

    #ifdefined(JSON_HEDLEY_REINTERPRET_CAST)
    #undefJSON_HEDLEY_REINTERPRET_CAST
    #endif
    #ifdefined(__cplusplus)
    #defineJSON_HEDLEY_REINTERPRET_CAST(T,expr)(reinterpret_cast<T>(expr))
    #else
    #defineJSON_HEDLEY_REINTERPRET_CAST(T,expr)((T)(expr))
    #endif

    #ifdefined(JSON_HEDLEY_STATIC_CAST)
    #undefJSON_HEDLEY_STATIC_CAST
    #endif
    #ifdefined(__cplusplus)
    #defineJSON_HEDLEY_STATIC_CAST(T,expr)(static_cast<T>(expr))
    #else
    #defineJSON_HEDLEY_STATIC_CAST(T,expr)((T)(expr))
    #endif

    #ifdefined(JSON_HEDLEY_CPP_CAST)
    #undefJSON_HEDLEY_CPP_CAST
    #endif
    #ifdefined(__cplusplus)
    #ifJSON_HEDLEY_HAS_WARNING("-Wold-style-cast")
    #defineJSON_HEDLEY_CPP_CAST(T,expr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wold-style-cast\"")\
    ((T)(expr))\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,3,0)
    #defineJSON_HEDLEY_CPP_CAST(T,expr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("diag_suppress=Pe137")\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #else
    #defineJSON_HEDLEY_CPP_CAST(T,expr)((T)(expr))
    #endif
    #else
    #defineJSON_HEDLEY_CPP_CAST(T,expr)(expr)
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("clangdiagnosticignored\"-Wdeprecated-declarations\"")
    #elifJSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("warning(disable:14781786)")
    #elifJSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED__pragma(warning(disable:14781786))
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("diag_suppress1215,1216,1444,1445")
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("diag_suppress1215,1444")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("GCCdiagnosticignored\"-Wdeprecated-declarations\"")
    #elifJSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED__pragma(warning(disable:4996))
    #elifJSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("diag_suppress1215,1444")
    #elif\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("diag_suppress1291,1718")
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0)&&!defined(__cplusplus)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)")
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0)&&defined(__cplusplus)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("error_messages(off,symdeprecated,symdeprecated2)")
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("diag_suppress=Pe1444,Pe1215")
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED_Pragma("warn(disable:2241)")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("clangdiagnosticignored\"-Wunknown-pragmas\"")
    #elifJSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("warning(disable:161)")
    #elifJSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS__pragma(warning(disable:161))
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("diag_suppress1675")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("GCCdiagnosticignored\"-Wunknown-pragmas\"")
    #elifJSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS__pragma(warning(disable:4068))
    #elif\
    JSON_HEDLEY_TI_VERSION_CHECK(16,9,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("diag_suppress163")
    #elifJSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("diag_suppress163")
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("diag_suppress=Pe161")
    #elifJSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS_Pragma("diag_suppress161")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wunknown-attributes")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("clangdiagnosticignored\"-Wunknown-attributes\"")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("GCCdiagnosticignored\"-Wdeprecated-declarations\"")
    #elifJSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("warning(disable:1292)")
    #elifJSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES__pragma(warning(disable:1292))
    #elifJSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES__pragma(warning(disable:5030))
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(20,7,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("diag_suppress1097,1098")
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("diag_suppress1097")
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0)&&defined(__cplusplus)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("error_messages(off,attrskipunsup)")
    #elif\
    JSON_HEDLEY_TI_VERSION_CHECK(18,1,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("diag_suppress1173")
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("diag_suppress=Pe1097")
    #elifJSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES_Pragma("diag_suppress1097")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wcast-qual")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL_Pragma("clangdiagnosticignored\"-Wcast-qual\"")
    #elifJSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL_Pragma("warning(disable:22032331)")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL_Pragma("GCCdiagnosticignored\"-Wcast-qual\"")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
    #endif

    #ifdefined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION)
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wunused-function")
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_Pragma("clangdiagnosticignored\"-Wunused-function\"")
    #elifJSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_Pragma("GCCdiagnosticignored\"-Wunused-function\"")
    #elifJSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION__pragma(warning(disable:4505))
    #elifJSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_Pragma("diag_suppress3142")
    #else
    #defineJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
    #endif

    #ifdefined(JSON_HEDLEY_DEPRECATED)
    #undefJSON_HEDLEY_DEPRECATED
    #endif
    #ifdefined(JSON_HEDLEY_DEPRECATED_FOR)
    #undefJSON_HEDLEY_DEPRECATED_FOR
    #endif
    #if\
    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DEPRECATED(since)__declspec(deprecated("Since"#since))
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)__declspec(deprecated("Since"#since";use"#replacement))
    #elif\
    (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message)&&!defined(JSON_HEDLEY_IAR_VERSION))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(18,1,0)||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_DEPRECATED(since)__attribute__((__deprecated__("Since"#since)))
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)__attribute__((__deprecated__("Since"#since";use"#replacement)))
    #elifdefined(__cplusplus)&&(__cplusplus>=201402L)
    #defineJSON_HEDLEY_DEPRECATED(since)JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since"#since)]])
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since"#since";use"#replacement)]])
    #elif\
    JSON_HEDLEY_HAS_ATTRIBUTE(deprecated)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
    #defineJSON_HEDLEY_DEPRECATED(since)__attribute__((__deprecated__))
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)__attribute__((__deprecated__))
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)||\
    JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_DEPRECATED(since)__declspec(deprecated)
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)__declspec(deprecated)
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_DEPRECATED(since)_Pragma("deprecated")
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)_Pragma("deprecated")
    #else
    #defineJSON_HEDLEY_DEPRECATED(since)
    #defineJSON_HEDLEY_DEPRECATED_FOR(since,replacement)
    #endif

    #ifdefined(JSON_HEDLEY_UNAVAILABLE)
    #undefJSON_HEDLEY_UNAVAILABLE
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(warning)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_UNAVAILABLE(available_since)__attribute__((__warning__("Notavailableuntil"#available_since)))
    #else
    #defineJSON_HEDLEY_UNAVAILABLE(available_since)
    #endif

    #ifdefined(JSON_HEDLEY_WARN_UNUSED_RESULT)
    #undefJSON_HEDLEY_WARN_UNUSED_RESULT
    #endif
    #ifdefined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG)
    #undefJSON_HEDLEY_WARN_UNUSED_RESULT_MSG
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)&&defined(__cplusplus))||\
    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT__attribute__((__warn_unused_result__))
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)__attribute__((__warn_unused_result__))
    #elif(JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)>=201907L)
    #defineJSON_HEDLEY_WARN_UNUSED_RESULTJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]])
    #elifJSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard)
    #defineJSON_HEDLEY_WARN_UNUSED_RESULTJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])
    #elifdefined(_Check_return_)/*SAL*/
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_Check_return_
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)_Check_return_
    #else
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT
    #defineJSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg)
    #endif

    #ifdefined(JSON_HEDLEY_SENTINEL)
    #undefJSON_HEDLEY_SENTINEL
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(sentinel)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_SENTINEL(position)__attribute__((__sentinel__(position)))
    #else
    #defineJSON_HEDLEY_SENTINEL(position)
    #endif

    #ifdefined(JSON_HEDLEY_NO_RETURN)
    #undefJSON_HEDLEY_NO_RETURN
    #endif
    #ifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_NO_RETURN__noreturn
    #elif\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_NO_RETURN__attribute__((__noreturn__))
    #elifdefined(__STDC_VERSION__)&&__STDC_VERSION__>=201112L
    #defineJSON_HEDLEY_NO_RETURN_Noreturn
    #elifdefined(__cplusplus)&&(__cplusplus>=201103L)
    #defineJSON_HEDLEY_NO_RETURNJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])
    #elif\
    JSON_HEDLEY_HAS_ATTRIBUTE(noreturn)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
    #defineJSON_HEDLEY_NO_RETURN__attribute__((__noreturn__))
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
    #defineJSON_HEDLEY_NO_RETURN_Pragma("does_not_return")
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_NO_RETURN__declspec(noreturn)
    #elifJSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0)&&defined(__cplusplus)
    #defineJSON_HEDLEY_NO_RETURN_Pragma("FUNC_NEVER_RETURNS;")
    #elifJSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
    #defineJSON_HEDLEY_NO_RETURN__attribute((noreturn))
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
    #defineJSON_HEDLEY_NO_RETURN__declspec(noreturn)
    #else
    #defineJSON_HEDLEY_NO_RETURN
    #endif

    #ifdefined(JSON_HEDLEY_NO_ESCAPE)
    #undefJSON_HEDLEY_NO_ESCAPE
    #endif
    #ifJSON_HEDLEY_HAS_ATTRIBUTE(noescape)
    #defineJSON_HEDLEY_NO_ESCAPE__attribute__((__noescape__))
    #else
    #defineJSON_HEDLEY_NO_ESCAPE
    #endif

    #ifdefined(JSON_HEDLEY_UNREACHABLE)
    #undefJSON_HEDLEY_UNREACHABLE
    #endif
    #ifdefined(JSON_HEDLEY_UNREACHABLE_RETURN)
    #undefJSON_HEDLEY_UNREACHABLE_RETURN
    #endif
    #ifdefined(JSON_HEDLEY_ASSUME)
    #undefJSON_HEDLEY_ASSUME
    #endif
    #if\
    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_ASSUME(expr)__assume(expr)
    #elifJSON_HEDLEY_HAS_BUILTIN(__builtin_assume)
    #defineJSON_HEDLEY_ASSUME(expr)__builtin_assume(expr)
    #elif\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
    #ifdefined(__cplusplus)
    #defineJSON_HEDLEY_ASSUME(expr)std::_nassert(expr)
    #else
    #defineJSON_HEDLEY_ASSUME(expr)_nassert(expr)
    #endif
    #endif
    #if\
    (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable)&&(!defined(JSON_HEDLEY_ARM_VERSION)))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5)||\
    JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_UNREACHABLE()__builtin_unreachable()
    #elifdefined(JSON_HEDLEY_ASSUME)
    #defineJSON_HEDLEY_UNREACHABLE()JSON_HEDLEY_ASSUME(0)
    #endif
    #if!defined(JSON_HEDLEY_ASSUME)
    #ifdefined(JSON_HEDLEY_UNREACHABLE)
    #defineJSON_HEDLEY_ASSUME(expr)JSON_HEDLEY_STATIC_CAST(void,((expr)?1:(JSON_HEDLEY_UNREACHABLE(),1)))
    #else
    #defineJSON_HEDLEY_ASSUME(expr)JSON_HEDLEY_STATIC_CAST(void,expr)
    #endif
    #endif
    #ifdefined(JSON_HEDLEY_UNREACHABLE)
    #if\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)
    #defineJSON_HEDLEY_UNREACHABLE_RETURN(value)return(JSON_HEDLEY_STATIC_CAST(void,JSON_HEDLEY_ASSUME(0)),(value))
    #else
    #defineJSON_HEDLEY_UNREACHABLE_RETURN(value)JSON_HEDLEY_UNREACHABLE()
    #endif
    #else
    #defineJSON_HEDLEY_UNREACHABLE_RETURN(value)return(value)
    #endif
    #if!defined(JSON_HEDLEY_UNREACHABLE)
    #defineJSON_HEDLEY_UNREACHABLE()JSON_HEDLEY_ASSUME(0)
    #endif

    JSON_HEDLEY_DIAGNOSTIC_PUSH
    #ifJSON_HEDLEY_HAS_WARNING("-Wpedantic")
    #pragmaclangdiagnosticignored"-Wpedantic"
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic")&&defined(__cplusplus)
    #pragmaclangdiagnosticignored"-Wc++98-compat-pedantic"
    #endif
    #ifJSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0)
    #ifdefined(__clang__)
    #pragmaclangdiagnosticignored"-Wvariadic-macros"
    #elifdefined(JSON_HEDLEY_GCC_VERSION)
    #pragmaGCCdiagnosticignored"-Wvariadic-macros"
    #endif
    #endif
    #ifdefined(JSON_HEDLEY_NON_NULL)
    #undefJSON_HEDLEY_NON_NULL
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(nonnull)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
    #defineJSON_HEDLEY_NON_NULL(...)__attribute__((__nonnull__(__VA_ARGS__)))
    #else
    #defineJSON_HEDLEY_NON_NULL(...)
    #endif
    JSON_HEDLEY_DIAGNOSTIC_POP

    #ifdefined(JSON_HEDLEY_PRINTF_FORMAT)
    #undefJSON_HEDLEY_PRINTF_FORMAT
    #endif
    #ifdefined(__MINGW32__)&&JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0)&&!defined(__USE_MINGW_ANSI_STDIO)
    #defineJSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)__attribute__((__format__(ms_printf,string_idx,first_to_check)))
    #elifdefined(__MINGW32__)&&JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0)&&defined(__USE_MINGW_ANSI_STDIO)
    #defineJSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)__attribute__((__format__(gnu_printf,string_idx,first_to_check)))
    #elif\
    JSON_HEDLEY_HAS_ATTRIBUTE(format)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)__attribute__((__format__(__printf__,string_idx,first_to_check)))
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0)
    #defineJSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)__declspec(vaformat(printf,string_idx,first_to_check))
    #else
    #defineJSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)
    #endif

    #ifdefined(JSON_HEDLEY_CONSTEXPR)
    #undefJSON_HEDLEY_CONSTEXPR
    #endif
    #ifdefined(__cplusplus)
    #if__cplusplus>=201103L
    #defineJSON_HEDLEY_CONSTEXPRJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)
    #endif
    #endif
    #if!defined(JSON_HEDLEY_CONSTEXPR)
    #defineJSON_HEDLEY_CONSTEXPR
    #endif

    #ifdefined(JSON_HEDLEY_PREDICT)
    #undefJSON_HEDLEY_PREDICT
    #endif
    #ifdefined(JSON_HEDLEY_LIKELY)
    #undefJSON_HEDLEY_LIKELY
    #endif
    #ifdefined(JSON_HEDLEY_UNLIKELY)
    #undefJSON_HEDLEY_UNLIKELY
    #endif
    #ifdefined(JSON_HEDLEY_UNPREDICTABLE)
    #undefJSON_HEDLEY_UNPREDICTABLE
    #endif
    #ifJSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable)
    #defineJSON_HEDLEY_UNPREDICTABLE(expr)__builtin_unpredictable((expr))
    #endif
    #if\
    (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability)&&!defined(JSON_HEDLEY_PGI_VERSION))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_PREDICT(expr,value,probability)__builtin_expect_with_probability((expr),(value),(probability))
    #defineJSON_HEDLEY_PREDICT_TRUE(expr,probability)__builtin_expect_with_probability(!!(expr),1,(probability))
    #defineJSON_HEDLEY_PREDICT_FALSE(expr,probability)__builtin_expect_with_probability(!!(expr),0,(probability))
    #defineJSON_HEDLEY_LIKELY(expr)__builtin_expect(!!(expr),1)
    #defineJSON_HEDLEY_UNLIKELY(expr)__builtin_expect(!!(expr),0)
    #elif\
    (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect)&&!defined(JSON_HEDLEY_INTEL_CL_VERSION))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)&&defined(__cplusplus))||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27)||\
    JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_PREDICT(expr,expected,probability)\
    (((probability)>=0.9)?__builtin_expect((expr),(expected)):(JSON_HEDLEY_STATIC_CAST(void,expected),(expr)))
    #defineJSON_HEDLEY_PREDICT_TRUE(expr,probability)\
    (__extension__({\
    doublehedley_probability_=(probability);\
    ((hedley_probability_>=0.9)?__builtin_expect(!!(expr),1):((hedley_probability_<=0.1)?__builtin_expect(!!(expr),0):!!(expr)));\
    }))
    #defineJSON_HEDLEY_PREDICT_FALSE(expr,probability)\
    (__extension__({\
    doublehedley_probability_=(probability);\
    ((hedley_probability_>=0.9)?__builtin_expect(!!(expr),0):((hedley_probability_<=0.1)?__builtin_expect(!!(expr),1):!!(expr)));\
    }))
    #defineJSON_HEDLEY_LIKELY(expr)__builtin_expect(!!(expr),1)
    #defineJSON_HEDLEY_UNLIKELY(expr)__builtin_expect(!!(expr),0)
    #else
    #defineJSON_HEDLEY_PREDICT(expr,expected,probability)(JSON_HEDLEY_STATIC_CAST(void,expected),(expr))
    #defineJSON_HEDLEY_PREDICT_TRUE(expr,probability)(!!(expr))
    #defineJSON_HEDLEY_PREDICT_FALSE(expr,probability)(!!(expr))
    #defineJSON_HEDLEY_LIKELY(expr)(!!(expr))
    #defineJSON_HEDLEY_UNLIKELY(expr)(!!(expr))
    #endif
    #if!defined(JSON_HEDLEY_UNPREDICTABLE)
    #defineJSON_HEDLEY_UNPREDICTABLE(expr)JSON_HEDLEY_PREDICT(expr,1,0.5)
    #endif

    #ifdefined(JSON_HEDLEY_MALLOC)
    #undefJSON_HEDLEY_MALLOC
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(malloc)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_MALLOC__attribute__((__malloc__))
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
    #defineJSON_HEDLEY_MALLOC_Pragma("returns_new_memory")
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_MALLOC__declspec(restrict)
    #else
    #defineJSON_HEDLEY_MALLOC
    #endif

    #ifdefined(JSON_HEDLEY_PURE)
    #undefJSON_HEDLEY_PURE
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(pure)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_PURE__attribute__((__pure__))
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
    #defineJSON_HEDLEY_PURE_Pragma("does_not_write_global_data")
    #elifdefined(__cplusplus)&&\
    (\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)\
    )
    #defineJSON_HEDLEY_PURE_Pragma("FUNC_IS_PURE;")
    #else
    #defineJSON_HEDLEY_PURE
    #endif

    #ifdefined(JSON_HEDLEY_CONST)
    #undefJSON_HEDLEY_CONST
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(const)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_CONST__attribute__((__const__))
    #elif\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)
    #defineJSON_HEDLEY_CONST_Pragma("no_side_effect")
    #else
    #defineJSON_HEDLEY_CONSTJSON_HEDLEY_PURE
    #endif

    #ifdefined(JSON_HEDLEY_RESTRICT)
    #undefJSON_HEDLEY_RESTRICT
    #endif
    #ifdefined(__STDC_VERSION__)&&(__STDC_VERSION__>=199901L)&&!defined(__cplusplus)
    #defineJSON_HEDLEY_RESTRICTrestrict
    #elif\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0)&&defined(__cplusplus))||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)||\
    defined(__clang__)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_RESTRICT__restrict
    #elifJSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0)&&!defined(__cplusplus)
    #defineJSON_HEDLEY_RESTRICT_Restrict
    #else
    #defineJSON_HEDLEY_RESTRICT
    #endif

    #ifdefined(JSON_HEDLEY_INLINE)
    #undefJSON_HEDLEY_INLINE
    #endif
    #if\
    (defined(__STDC_VERSION__)&&(__STDC_VERSION__>=199901L))||\
    (defined(__cplusplus)&&(__cplusplus>=199711L))
    #defineJSON_HEDLEY_INLINEinline
    #elif\
    defined(JSON_HEDLEY_GCC_VERSION)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0)
    #defineJSON_HEDLEY_INLINE__inline__
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0)||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_INLINE__inline
    #else
    #defineJSON_HEDLEY_INLINE
    #endif

    #ifdefined(JSON_HEDLEY_ALWAYS_INLINE)
    #undefJSON_HEDLEY_ALWAYS_INLINE
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(always_inline)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
    #defineJSON_HEDLEY_ALWAYS_INLINE__attribute__((__always_inline__))JSON_HEDLEY_INLINE
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_ALWAYS_INLINE__forceinline
    #elifdefined(__cplusplus)&&\
    (\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)\
    )
    #defineJSON_HEDLEY_ALWAYS_INLINE_Pragma("FUNC_ALWAYS_INLINE;")
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_ALWAYS_INLINE_Pragma("inline=forced")
    #else
    #defineJSON_HEDLEY_ALWAYS_INLINEJSON_HEDLEY_INLINE
    #endif

    #ifdefined(JSON_HEDLEY_NEVER_INLINE)
    #undefJSON_HEDLEY_NEVER_INLINE
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(noinline)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0)||\
    JSON_HEDLEY_TI_VERSION_CHECK(15,12,0)||\
    (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0)||\
    (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0)||\
    (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0)||\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)||\
    JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0)||\
    JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)||\
    JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0)
    #defineJSON_HEDLEY_NEVER_INLINE__attribute__((__noinline__))
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_NEVER_INLINE__declspec(noinline)
    #elifJSON_HEDLEY_PGI_VERSION_CHECK(10,2,0)
    #defineJSON_HEDLEY_NEVER_INLINE_Pragma("noinline")
    #elifJSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0)&&defined(__cplusplus)
    #defineJSON_HEDLEY_NEVER_INLINE_Pragma("FUNC_CANNOT_INLINE;")
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_NEVER_INLINE_Pragma("inline=never")
    #elifJSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)
    #defineJSON_HEDLEY_NEVER_INLINE__attribute((noinline))
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)
    #defineJSON_HEDLEY_NEVER_INLINE__declspec(noinline)
    #else
    #defineJSON_HEDLEY_NEVER_INLINE
    #endif

    #ifdefined(JSON_HEDLEY_PRIVATE)
    #undefJSON_HEDLEY_PRIVATE
    #endif
    #ifdefined(JSON_HEDLEY_PUBLIC)
    #undefJSON_HEDLEY_PUBLIC
    #endif
    #ifdefined(JSON_HEDLEY_IMPORT)
    #undefJSON_HEDLEY_IMPORT
    #endif
    #ifdefined(_WIN32)||defined(__CYGWIN__)
    #defineJSON_HEDLEY_PRIVATE
    #defineJSON_HEDLEY_PUBLIC__declspec(dllexport)
    #defineJSON_HEDLEY_IMPORT__declspec(dllimport)
    #else
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(visibility)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0)||\
    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0)||\
    (\
    defined(__TI_EABI__)&&\
    (\
    (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0)&&defined(__TI_GNU_ATTRIBUTE_SUPPORT__))||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0)\
    )\
    )||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_PRIVATE__attribute__((__visibility__("hidden")))
    #defineJSON_HEDLEY_PUBLIC__attribute__((__visibility__("default")))
    #else
    #defineJSON_HEDLEY_PRIVATE
    #defineJSON_HEDLEY_PUBLIC
    #endif
    #defineJSON_HEDLEY_IMPORTextern
    #endif

    #ifdefined(JSON_HEDLEY_NO_THROW)
    #undefJSON_HEDLEY_NO_THROW
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(nothrow)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_NO_THROW__attribute__((__nothrow__))
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)
    #defineJSON_HEDLEY_NO_THROW__declspec(nothrow)
    #else
    #defineJSON_HEDLEY_NO_THROW
    #endif

    #ifdefined(JSON_HEDLEY_FALL_THROUGH)
    #undefJSON_HEDLEY_FALL_THROUGH
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_FALL_THROUGH__attribute__((__fallthrough__))
    #elifJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)
    #defineJSON_HEDLEY_FALL_THROUGHJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])
    #elifJSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)
    #defineJSON_HEDLEY_FALL_THROUGHJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])
    #elifdefined(__fallthrough)/*SAL*/
    #defineJSON_HEDLEY_FALL_THROUGH__fallthrough
    #else
    #defineJSON_HEDLEY_FALL_THROUGH
    #endif

    #ifdefined(JSON_HEDLEY_RETURNS_NON_NULL)
    #undefJSON_HEDLEY_RETURNS_NON_NULL
    #endif
    #if\
    JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_RETURNS_NON_NULL__attribute__((__returns_nonnull__))
    #elifdefined(_Ret_notnull_)/*SAL*/
    #defineJSON_HEDLEY_RETURNS_NON_NULL_Ret_notnull_
    #else
    #defineJSON_HEDLEY_RETURNS_NON_NULL
    #endif

    #ifdefined(JSON_HEDLEY_ARRAY_PARAM)
    #undefJSON_HEDLEY_ARRAY_PARAM
    #endif
    #if\
    defined(__STDC_VERSION__)&&(__STDC_VERSION__>=199901L)&&\
    !defined(__STDC_NO_VLA__)&&\
    !defined(__cplusplus)&&\
    !defined(JSON_HEDLEY_PGI_VERSION)&&\
    !defined(JSON_HEDLEY_TINYC_VERSION)
    #defineJSON_HEDLEY_ARRAY_PARAM(name)(name)
    #else
    #defineJSON_HEDLEY_ARRAY_PARAM(name)
    #endif

    #ifdefined(JSON_HEDLEY_IS_CONSTANT)
    #undefJSON_HEDLEY_IS_CONSTANT
    #endif
    #ifdefined(JSON_HEDLEY_REQUIRE_CONSTEXPR)
    #undefJSON_HEDLEY_REQUIRE_CONSTEXPR
    #endif
    /*JSON_HEDLEY_IS_CONSTEXPR_isfor
    HEDLEYINTERNALUSEONLY.APIsubjecttochangewithoutnotice.*/
    #ifdefined(JSON_HEDLEY_IS_CONSTEXPR_)
    #undefJSON_HEDLEY_IS_CONSTEXPR_
    #endif
    #if\
    JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0)||\
    JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0)||\
    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)&&!defined(__cplusplus))||\
    JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0)||\
    JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10)
    #defineJSON_HEDLEY_IS_CONSTANT(expr)__builtin_constant_p(expr)
    #endif
    #if!defined(__cplusplus)
    #if\
    JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p)||\
    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0)||\
    JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0)||\
    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24)
    #ifdefined(__INTPTR_TYPE__)
    #defineJSON_HEDLEY_IS_CONSTEXPR_(expr)__builtin_types_compatible_p(__typeof__((1?(void*)((__INTPTR_TYPE__)((expr)*0)):(int*)0)),int*)
    #else
    #include<stdint.h>
    #defineJSON_HEDLEY_IS_CONSTEXPR_(expr)__builtin_types_compatible_p(__typeof__((1?(void*)((intptr_t)((expr)*0)):(int*)0)),int*)
    #endif
    #elif\
    (\
    defined(__STDC_VERSION__)&&(__STDC_VERSION__>=201112L)&&\
    !defined(JSON_HEDLEY_SUNPRO_VERSION)&&\
    !defined(JSON_HEDLEY_PGI_VERSION)&&\
    !defined(JSON_HEDLEY_IAR_VERSION))||\
    (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections)&&!defined(JSON_HEDLEY_IAR_VERSION))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0)||\
    JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0)||\
    JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0)
    #ifdefined(__INTPTR_TYPE__)
    #defineJSON_HEDLEY_IS_CONSTEXPR_(expr)_Generic((1?(void*)((__INTPTR_TYPE__)((expr)*0)):(int*)0),int*:1,void*:0)
    #else
    #include<stdint.h>
    #defineJSON_HEDLEY_IS_CONSTEXPR_(expr)_Generic((1?(void*)((intptr_t)*0):(int*)0),int*:1,void*:0)
    #endif
    #elif\
    defined(JSON_HEDLEY_GCC_VERSION)||\
    defined(JSON_HEDLEY_INTEL_VERSION)||\
    defined(JSON_HEDLEY_TINYC_VERSION)||\
    defined(JSON_HEDLEY_TI_ARMCL_VERSION)||\
    JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0)||\
    defined(JSON_HEDLEY_TI_CL2000_VERSION)||\
    defined(JSON_HEDLEY_TI_CL6X_VERSION)||\
    defined(JSON_HEDLEY_TI_CL7X_VERSION)||\
    defined(JSON_HEDLEY_TI_CLPRU_VERSION)||\
    defined(__clang__)
    #defineJSON_HEDLEY_IS_CONSTEXPR_(expr)(\
    sizeof(void)!=\
    sizeof(*(\
    1?\
    ((void*)((expr)*0L)):\
    ((struct{charv[sizeof(void)*2];}*)1)\
    )\
    )\
    )
    #endif
    #endif
    #ifdefined(JSON_HEDLEY_IS_CONSTEXPR_)
    #if!defined(JSON_HEDLEY_IS_CONSTANT)
    #defineJSON_HEDLEY_IS_CONSTANT(expr)JSON_HEDLEY_IS_CONSTEXPR_(expr)
    #endif
    #defineJSON_HEDLEY_REQUIRE_CONSTEXPR(expr)(JSON_HEDLEY_IS_CONSTEXPR_(expr)?(expr):(-1))
    #else
    #if!defined(JSON_HEDLEY_IS_CONSTANT)
    #defineJSON_HEDLEY_IS_CONSTANT(expr)(0)
    #endif
    #defineJSON_HEDLEY_REQUIRE_CONSTEXPR(expr)(expr)
    #endif

    #ifdefined(JSON_HEDLEY_BEGIN_C_DECLS)
    #undefJSON_HEDLEY_BEGIN_C_DECLS
    #endif
    #ifdefined(JSON_HEDLEY_END_C_DECLS)
    #undefJSON_HEDLEY_END_C_DECLS
    #endif
    #ifdefined(JSON_HEDLEY_C_DECL)
    #undefJSON_HEDLEY_C_DECL
    #endif
    #ifdefined(__cplusplus)
    #defineJSON_HEDLEY_BEGIN_C_DECLSextern"C"{
    #defineJSON_HEDLEY_END_C_DECLS}
    #defineJSON_HEDLEY_C_DECLextern"C"
    #else
    #defineJSON_HEDLEY_BEGIN_C_DECLS
    #defineJSON_HEDLEY_END_C_DECLS
    #defineJSON_HEDLEY_C_DECL
    #endif

    #ifdefined(JSON_HEDLEY_STATIC_ASSERT)
    #undefJSON_HEDLEY_STATIC_ASSERT
    #endif
    #if\
    !defined(__cplusplus)&&(\
    (defined(__STDC_VERSION__)&&(__STDC_VERSION__>=201112L))||\
    (JSON_HEDLEY_HAS_FEATURE(c_static_assert)&&!defined(JSON_HEDLEY_INTEL_CL_VERSION))||\
    JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)||\
    defined(_Static_assert)\
    )
    #defineJSON_HEDLEY_STATIC_ASSERT(expr,message)_Static_assert(expr,message)
    #elif\
    (defined(__cplusplus)&&(__cplusplus>=201103L))||\
    JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_STATIC_ASSERT(expr,message)JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr,message))
    #else
    #defineJSON_HEDLEY_STATIC_ASSERT(expr,message)
    #endif

    #ifdefined(JSON_HEDLEY_NULL)
    #undefJSON_HEDLEY_NULL
    #endif
    #ifdefined(__cplusplus)
    #if__cplusplus>=201103L
    #defineJSON_HEDLEY_NULLJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)
    #elifdefined(NULL)
    #defineJSON_HEDLEY_NULLNULL
    #else
    #defineJSON_HEDLEY_NULLJSON_HEDLEY_STATIC_CAST(void*,0)
    #endif
    #elifdefined(NULL)
    #defineJSON_HEDLEY_NULLNULL
    #else
    #defineJSON_HEDLEY_NULL((void*)0)
    #endif

    #ifdefined(JSON_HEDLEY_MESSAGE)
    #undefJSON_HEDLEY_MESSAGE
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
    #defineJSON_HEDLEY_MESSAGE(msg)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\
    JSON_HEDLEY_PRAGMA(messagemsg)\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #elif\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_MESSAGE(msg)JSON_HEDLEY_PRAGMA(messagemsg)
    #elifJSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)
    #defineJSON_HEDLEY_MESSAGE(msg)JSON_HEDLEY_PRAGMA(_CRImessagemsg)
    #elifJSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)
    #defineJSON_HEDLEY_MESSAGE(msg)JSON_HEDLEY_PRAGMA(message(msg))
    #elifJSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0)
    #defineJSON_HEDLEY_MESSAGE(msg)JSON_HEDLEY_PRAGMA(message(msg))
    #else
    #defineJSON_HEDLEY_MESSAGE(msg)
    #endif

    #ifdefined(JSON_HEDLEY_WARNING)
    #undefJSON_HEDLEY_WARNING
    #endif
    #ifJSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas")
    #defineJSON_HEDLEY_WARNING(msg)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\
    JSON_HEDLEY_PRAGMA(clangwarningmsg)\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #elif\
    JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0)||\
    JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0)||\
    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)
    #defineJSON_HEDLEY_WARNING(msg)JSON_HEDLEY_PRAGMA(GCCwarningmsg)
    #elif\
    JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_WARNING(msg)JSON_HEDLEY_PRAGMA(message(msg))
    #else
    #defineJSON_HEDLEY_WARNING(msg)JSON_HEDLEY_MESSAGE(msg)
    #endif

    #ifdefined(JSON_HEDLEY_REQUIRE)
    #undefJSON_HEDLEY_REQUIRE
    #endif
    #ifdefined(JSON_HEDLEY_REQUIRE_MSG)
    #undefJSON_HEDLEY_REQUIRE_MSG
    #endif
    #ifJSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if)
    #ifJSON_HEDLEY_HAS_WARNING("-Wgcc-compat")
    #defineJSON_HEDLEY_REQUIRE(expr)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wgcc-compat\"")\
    __attribute__((diagnose_if(!(expr),#expr,"error")))\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #defineJSON_HEDLEY_REQUIRE_MSG(expr,msg)\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("clangdiagnosticignored\"-Wgcc-compat\"")\
    __attribute__((diagnose_if(!(expr),msg,"error")))\
    JSON_HEDLEY_DIAGNOSTIC_POP
    #else
    #defineJSON_HEDLEY_REQUIRE(expr)__attribute__((diagnose_if(!(expr),#expr,"error")))
    #defineJSON_HEDLEY_REQUIRE_MSG(expr,msg)__attribute__((diagnose_if(!(expr),msg,"error")))
    #endif
    #else
    #defineJSON_HEDLEY_REQUIRE(expr)
    #defineJSON_HEDLEY_REQUIRE_MSG(expr,msg)
    #endif

    #ifdefined(JSON_HEDLEY_FLAGS)
    #undefJSON_HEDLEY_FLAGS
    #endif
    #ifJSON_HEDLEY_HAS_ATTRIBUTE(flag_enum)&&(!defined(__cplusplus)||JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion"))
    #defineJSON_HEDLEY_FLAGS__attribute__((__flag_enum__))
    #else
    #defineJSON_HEDLEY_FLAGS
    #endif

    #ifdefined(JSON_HEDLEY_FLAGS_CAST)
    #undefJSON_HEDLEY_FLAGS_CAST
    #endif
    #ifJSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0)
    #defineJSON_HEDLEY_FLAGS_CAST(T,expr)(__extension__({\
    JSON_HEDLEY_DIAGNOSTIC_PUSH\
    _Pragma("warning(disable:188)")\
    ((T)(expr));\
    JSON_HEDLEY_DIAGNOSTIC_POP\
    }))
    #else
    #defineJSON_HEDLEY_FLAGS_CAST(T,expr)JSON_HEDLEY_STATIC_CAST(T,expr)
    #endif

    #ifdefined(JSON_HEDLEY_EMPTY_BASES)
    #undefJSON_HEDLEY_EMPTY_BASES
    #endif
    #if\
    (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918)&&!JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0))||\
    JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0)
    #defineJSON_HEDLEY_EMPTY_BASES__declspec(empty_bases)
    #else
    #defineJSON_HEDLEY_EMPTY_BASES
    #endif

    /*Remainingmacrosaredeprecated.*/

    #ifdefined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)
    #undefJSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
    #endif
    #ifdefined(__clang__)
    #defineJSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch)(0)
    #else
    #defineJSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch)JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)
    #endif

    #ifdefined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)
    #undefJSON_HEDLEY_CLANG_HAS_ATTRIBUTE
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute)JSON_HEDLEY_HAS_ATTRIBUTE(attribute)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)
    #undefJSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute)JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_BUILTIN)
    #undefJSON_HEDLEY_CLANG_HAS_BUILTIN
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_BUILTIN(builtin)JSON_HEDLEY_HAS_BUILTIN(builtin)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_FEATURE)
    #undefJSON_HEDLEY_CLANG_HAS_FEATURE
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_FEATURE(feature)JSON_HEDLEY_HAS_FEATURE(feature)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_EXTENSION)
    #undefJSON_HEDLEY_CLANG_HAS_EXTENSION
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_EXTENSION(extension)JSON_HEDLEY_HAS_EXTENSION(extension)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)
    #undefJSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute)JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)

    #ifdefined(JSON_HEDLEY_CLANG_HAS_WARNING)
    #undefJSON_HEDLEY_CLANG_HAS_WARNING
    #endif
    #defineJSON_HEDLEY_CLANG_HAS_WARNING(warning)JSON_HEDLEY_HAS_WARNING(warning)

    #endif/*!defined(JSON_HEDLEY_VERSION)||(JSON_HEDLEY_VERSION<X)*/

    //Thisfilecontainsallinternalmacrodefinitions
    //YouMUSTincludemacro_unscope.hppattheendofjson.hpptoundefallofthem

    //excludeunsupportedcompilers
    #if!defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
    #ifdefined(__clang__)
    #if(__clang_major__*10000+__clang_minor__*100+__clang_patchlevel__)<30400
    #error"unsupportedClangversion-seehttps://github.com/nlohmann/json#supported-compilers"
    #endif
    #elifdefined(__GNUC__)&&!(defined(__ICC)||defined(__INTEL_COMPILER))
    #if(__GNUC__*10000+__GNUC_MINOR__*100+__GNUC_PATCHLEVEL__)<40800
    #error"unsupportedGCCversion-seehttps://github.com/nlohmann/json#supported-compilers"
    #endif
    #endif
    #endif

    //C++languagestandarddetection
    //iftheusermanuallyspecifiedtheusedc++versionthisisskipped
    #if!defined(JSON_HAS_CPP_20)&&!defined(JSON_HAS_CPP_17)&&!defined(JSON_HAS_CPP_14)&&!defined(JSON_HAS_CPP_11)
    #if(defined(__cplusplus)&&__cplusplus>=202002L)||(defined(_MSVC_LANG)&&_MSVC_LANG>=202002L)
    #defineJSON_HAS_CPP_20
    #defineJSON_HAS_CPP_17
    #defineJSON_HAS_CPP_14
    #elif(defined(__cplusplus)&&__cplusplus>=201703L)||(defined(_HAS_CXX17)&&_HAS_CXX17==1)//fixforissue#464
    #defineJSON_HAS_CPP_17
    #defineJSON_HAS_CPP_14
    #elif(defined(__cplusplus)&&__cplusplus>=201402L)||(defined(_HAS_CXX14)&&_HAS_CXX14==1)
    #defineJSON_HAS_CPP_14
    #endif
    //thecpp11flagisalwaysspecifiedbecauseitistheminimalrequiredversion
    #defineJSON_HAS_CPP_11
    #endif

    //disabledocumentationwarningsonclang
    #ifdefined(__clang__)
    #pragmaGCCdiagnosticpush
    #pragmaGCCdiagnosticignored"-Wdocumentation"
    #endif

    //allowtodisableexceptions
    #if(defined(__cpp_exceptions)||defined(__EXCEPTIONS)||defined(_CPPUNWIND))&&!defined(JSON_NOEXCEPTION)
    #defineJSON_THROW(exception)throwexception
    #defineJSON_TRYtry
    #defineJSON_CATCH(exception)catch(exception)
    #defineJSON_INTERNAL_CATCH(exception)catch(exception)
    #else
    #include<cstdlib>
    #defineJSON_THROW(exception)std::abort()
    #defineJSON_TRYif(true)
    #defineJSON_CATCH(exception)if(false)
    #defineJSON_INTERNAL_CATCH(exception)if(false)
    #endif

    //overrideexceptionmacros
    #ifdefined(JSON_THROW_USER)
    #undefJSON_THROW
    #defineJSON_THROWJSON_THROW_USER
    #endif
    #ifdefined(JSON_TRY_USER)
    #undefJSON_TRY
    #defineJSON_TRYJSON_TRY_USER
    #endif
    #ifdefined(JSON_CATCH_USER)
    #undefJSON_CATCH
    #defineJSON_CATCHJSON_CATCH_USER
    #undefJSON_INTERNAL_CATCH
    #defineJSON_INTERNAL_CATCHJSON_CATCH_USER
    #endif
    #ifdefined(JSON_INTERNAL_CATCH_USER)
    #undefJSON_INTERNAL_CATCH
    #defineJSON_INTERNAL_CATCHJSON_INTERNAL_CATCH_USER
    #endif

    //allowtooverrideassert
    #if!defined(JSON_ASSERT)
    #include<cassert>//assert
    #defineJSON_ASSERT(x)assert(x)
    #endif

    //allowtoaccesssomeprivatefunctions(neededbythetestsuite)
    #ifdefined(JSON_TESTS_PRIVATE)
    #defineJSON_PRIVATE_UNLESS_TESTEDpublic
    #else
    #defineJSON_PRIVATE_UNLESS_TESTEDprivate
    #endif

    #defineNLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE,...)\
    template<typenameBasicJsonType>\
    inlinevoidto_json(BasicJsonType&j,constENUM_TYPE&e)\
    {\
    static_assert(std::is_enum<ENUM_TYPE>::value,#ENUM_TYPE"mustbeanenum!");\
    staticconststd::pair<ENUM_TYPE,BasicJsonType>m[]=__VA_ARGS__;\
    autoit=std::find_if(std::begin(m),std::end(m),\
    [e](conststd::pair<ENUM_TYPE,BasicJsonType>&ej_pair)->bool\
    {\
    returnej_pair.first==e;\
    });\
    j=((it!=std::end(m))?it:std::begin(m))->second;\
    }\
    template<typenameBasicJsonType>\
    inlinevoidfrom_json(constBasicJsonType&j,ENUM_TYPE&e)\
    {\
    static_assert(std::is_enum<ENUM_TYPE>::value,#ENUM_TYPE"mustbeanenum!");\
    staticconststd::pair<ENUM_TYPE,BasicJsonType>m[]=__VA_ARGS__;\
    autoit=std::find_if(std::begin(m),std::end(m),\
    [&j](conststd::pair<ENUM_TYPE,BasicJsonType>&ej_pair)->bool\
    {\
    returnej_pair.second==j;\
    });\
    e=((it!=std::end(m))?it:std::begin(m))->first;\
    }

    //Uglymacrostoavoidugliercopy-pastewhenspecializingbasic_json.They
    //mayberemovedinthefutureoncetheclassissplit.

    #defineNLOHMANN_BASIC_JSON_TPL_DECLARATION\
    template<template<typename,typename,typename...>classObjectType,\
    template<typename,typename...>classArrayType,\
    classStringType,classBooleanType,classNumberIntegerType,\
    classNumberUnsignedType,classNumberFloatType,\
    template<typename>classAllocatorType,\
    template<typename,typename=void>classJSONSerializer,\
    classBinaryType>

    #defineNLOHMANN_BASIC_JSON_TPL\
    basic_json<ObjectType,ArrayType,StringType,BooleanType,\
    NumberIntegerType,NumberUnsignedType,NumberFloatType,\
    AllocatorType,JSONSerializer,BinaryType>

    //Macrostosimplifyconversionfrom/totypes

    #defineNLOHMANN_JSON_EXPAND(x)x
    #defineNLOHMANN_JSON_GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,NAME,...)NAME
    #defineNLOHMANN_JSON_PASTE(...)NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__,\
    NLOHMANN_JSON_PASTE64,\
    NLOHMANN_JSON_PASTE63,\
    NLOHMANN_JSON_PASTE62,\
    NLOHMANN_JSON_PASTE61,\
    NLOHMANN_JSON_PASTE60,\
    NLOHMANN_JSON_PASTE59,\
    NLOHMANN_JSON_PASTE58,\
    NLOHMANN_JSON_PASTE57,\
    NLOHMANN_JSON_PASTE56,\
    NLOHMANN_JSON_PASTE55,\
    NLOHMANN_JSON_PASTE54,\
    NLOHMANN_JSON_PASTE53,\
    NLOHMANN_JSON_PASTE52,\
    NLOHMANN_JSON_PASTE51,\
    NLOHMANN_JSON_PASTE50,\
    NLOHMANN_JSON_PASTE49,\
    NLOHMANN_JSON_PASTE48,\
    NLOHMANN_JSON_PASTE47,\
    NLOHMANN_JSON_PASTE46,\
    NLOHMANN_JSON_PASTE45,\
    NLOHMANN_JSON_PASTE44,\
    NLOHMANN_JSON_PASTE43,\
    NLOHMANN_JSON_PASTE42,\
    NLOHMANN_JSON_PASTE41,\
    NLOHMANN_JSON_PASTE40,\
    NLOHMANN_JSON_PASTE39,\
    NLOHMANN_JSON_PASTE38,\
    NLOHMANN_JSON_PASTE37,\
    NLOHMANN_JSON_PASTE36,\
    NLOHMANN_JSON_PASTE35,\
    NLOHMANN_JSON_PASTE34,\
    NLOHMANN_JSON_PASTE33,\
    NLOHMANN_JSON_PASTE32,\
    NLOHMANN_JSON_PASTE31,\
    NLOHMANN_JSON_PASTE30,\
    NLOHMANN_JSON_PASTE29,\
    NLOHMANN_JSON_PASTE28,\
    NLOHMANN_JSON_PASTE27,\
    NLOHMANN_JSON_PASTE26,\
    NLOHMANN_JSON_PASTE25,\
    NLOHMANN_JSON_PASTE24,\
    NLOHMANN_JSON_PASTE23,\
    NLOHMANN_JSON_PASTE22,\
    NLOHMANN_JSON_PASTE21,\
    NLOHMANN_JSON_PASTE20,\
    NLOHMANN_JSON_PASTE19,\
    NLOHMANN_JSON_PASTE18,\
    NLOHMANN_JSON_PASTE17,\
    NLOHMANN_JSON_PASTE16,\
    NLOHMANN_JSON_PASTE15,\
    NLOHMANN_JSON_PASTE14,\
    NLOHMANN_JSON_PASTE13,\
    NLOHMANN_JSON_PASTE12,\
    NLOHMANN_JSON_PASTE11,\
    NLOHMANN_JSON_PASTE10,\
    NLOHMANN_JSON_PASTE9,\
    NLOHMANN_JSON_PASTE8,\
    NLOHMANN_JSON_PASTE7,\
    NLOHMANN_JSON_PASTE6,\
    NLOHMANN_JSON_PASTE5,\
    NLOHMANN_JSON_PASTE4,\
    NLOHMANN_JSON_PASTE3,\
    NLOHMANN_JSON_PASTE2,\
    NLOHMANN_JSON_PASTE1)(__VA_ARGS__))
    #defineNLOHMANN_JSON_PASTE2(func,v1)func(v1)
    #defineNLOHMANN_JSON_PASTE3(func,v1,v2)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE2(func,v2)
    #defineNLOHMANN_JSON_PASTE4(func,v1,v2,v3)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE3(func,v2,v3)
    #defineNLOHMANN_JSON_PASTE5(func,v1,v2,v3,v4)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE4(func,v2,v3,v4)
    #defineNLOHMANN_JSON_PASTE6(func,v1,v2,v3,v4,v5)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE5(func,v2,v3,v4,v5)
    #defineNLOHMANN_JSON_PASTE7(func,v1,v2,v3,v4,v5,v6)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE6(func,v2,v3,v4,v5,v6)
    #defineNLOHMANN_JSON_PASTE8(func,v1,v2,v3,v4,v5,v6,v7)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE7(func,v2,v3,v4,v5,v6,v7)
    #defineNLOHMANN_JSON_PASTE9(func,v1,v2,v3,v4,v5,v6,v7,v8)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE8(func,v2,v3,v4,v5,v6,v7,v8)
    #defineNLOHMANN_JSON_PASTE10(func,v1,v2,v3,v4,v5,v6,v7,v8,v9)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE9(func,v2,v3,v4,v5,v6,v7,v8,v9)
    #defineNLOHMANN_JSON_PASTE11(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE10(func,v2,v3,v4,v5,v6,v7,v8,v9,v10)
    #defineNLOHMANN_JSON_PASTE12(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE11(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11)
    #defineNLOHMANN_JSON_PASTE13(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE12(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12)
    #defineNLOHMANN_JSON_PASTE14(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE13(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13)
    #defineNLOHMANN_JSON_PASTE15(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE14(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14)
    #defineNLOHMANN_JSON_PASTE16(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE15(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15)
    #defineNLOHMANN_JSON_PASTE17(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE16(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16)
    #defineNLOHMANN_JSON_PASTE18(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE17(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17)
    #defineNLOHMANN_JSON_PASTE19(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE18(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18)
    #defineNLOHMANN_JSON_PASTE20(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE19(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19)
    #defineNLOHMANN_JSON_PASTE21(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE20(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20)
    #defineNLOHMANN_JSON_PASTE22(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE21(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21)
    #defineNLOHMANN_JSON_PASTE23(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE22(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22)
    #defineNLOHMANN_JSON_PASTE24(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE23(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23)
    #defineNLOHMANN_JSON_PASTE25(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE24(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24)
    #defineNLOHMANN_JSON_PASTE26(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE25(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25)
    #defineNLOHMANN_JSON_PASTE27(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE26(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26)
    #defineNLOHMANN_JSON_PASTE28(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE27(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27)
    #defineNLOHMANN_JSON_PASTE29(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE28(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28)
    #defineNLOHMANN_JSON_PASTE30(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE29(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29)
    #defineNLOHMANN_JSON_PASTE31(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE30(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30)
    #defineNLOHMANN_JSON_PASTE32(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE31(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31)
    #defineNLOHMANN_JSON_PASTE33(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE32(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32)
    #defineNLOHMANN_JSON_PASTE34(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE33(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33)
    #defineNLOHMANN_JSON_PASTE35(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE34(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34)
    #defineNLOHMANN_JSON_PASTE36(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE35(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35)
    #defineNLOHMANN_JSON_PASTE37(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE36(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36)
    #defineNLOHMANN_JSON_PASTE38(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE37(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37)
    #defineNLOHMANN_JSON_PASTE39(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE38(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38)
    #defineNLOHMANN_JSON_PASTE40(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE39(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39)
    #defineNLOHMANN_JSON_PASTE41(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE40(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40)
    #defineNLOHMANN_JSON_PASTE42(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE41(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41)
    #defineNLOHMANN_JSON_PASTE43(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE42(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42)
    #defineNLOHMANN_JSON_PASTE44(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE43(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43)
    #defineNLOHMANN_JSON_PASTE45(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE44(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44)
    #defineNLOHMANN_JSON_PASTE46(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE45(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45)
    #defineNLOHMANN_JSON_PASTE47(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE46(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46)
    #defineNLOHMANN_JSON_PASTE48(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE47(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47)
    #defineNLOHMANN_JSON_PASTE49(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE48(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48)
    #defineNLOHMANN_JSON_PASTE50(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE49(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49)
    #defineNLOHMANN_JSON_PASTE51(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE50(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50)
    #defineNLOHMANN_JSON_PASTE52(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE51(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51)
    #defineNLOHMANN_JSON_PASTE53(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE52(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52)
    #defineNLOHMANN_JSON_PASTE54(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE53(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53)
    #defineNLOHMANN_JSON_PASTE55(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE54(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54)
    #defineNLOHMANN_JSON_PASTE56(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE55(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55)
    #defineNLOHMANN_JSON_PASTE57(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE56(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56)
    #defineNLOHMANN_JSON_PASTE58(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE57(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57)
    #defineNLOHMANN_JSON_PASTE59(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE58(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58)
    #defineNLOHMANN_JSON_PASTE60(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE59(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59)
    #defineNLOHMANN_JSON_PASTE61(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE60(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60)
    #defineNLOHMANN_JSON_PASTE62(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE61(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61)
    #defineNLOHMANN_JSON_PASTE63(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61,v62)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE62(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61,v62)
    #defineNLOHMANN_JSON_PASTE64(func,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61,v62,v63)NLOHMANN_JSON_PASTE2(func,v1)NLOHMANN_JSON_PASTE63(func,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,v50,v51,v52,v53,v54,v55,v56,v57,v58,v59,v60,v61,v62,v63)

    #defineNLOHMANN_JSON_TO(v1)nlohmann_json_j[#v1]=nlohmann_json_t.v1;
    #defineNLOHMANN_JSON_FROM(v1)nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1);

    #defineNLOHMANN_DEFINE_TYPE_INTRUSIVE(Type,...)\
    friendvoidto_json(nlohmann::json&nlohmann_json_j,constType&nlohmann_json_t){NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO,__VA_ARGS__))}\
    friendvoidfrom_json(constnlohmann::json&nlohmann_json_j,Type&nlohmann_json_t){NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM,__VA_ARGS__))}

    #defineNLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type,...)\
    inlinevoidto_json(nlohmann::json&nlohmann_json_j,constType&nlohmann_json_t){NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO,__VA_ARGS__))}\
    inlinevoidfrom_json(constnlohmann::json&nlohmann_json_j,Type&nlohmann_json_t){NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM,__VA_ARGS__))}

    #ifndefJSON_USE_IMPLICIT_CONVERSIONS
    #defineJSON_USE_IMPLICIT_CONVERSIONS1
    #endif

    #ifJSON_USE_IMPLICIT_CONVERSIONS
    #defineJSON_EXPLICIT
    #else
    #defineJSON_EXPLICITexplicit
    #endif

    namespacenlohmann
    {
    namespacedetail
    {

    inlinevoidreplace_substring(std::string&s,conststd::string&f,
    conststd::string&t)
    {
    JSON_ASSERT(!f.empty());
    for(autopos=s.find(f);//findfirstoccurrenceoff
    pos!=std::string::npos;//makesurefwasfound
    s.replace(pos,f.size(),t),//replacewitht,and
    pos=s.find(f,pos+t.size()))//findnextoccurrenceoff
    {}
    }

    inlinestd::stringescape(std::strings)
    {
    replace_substring(s,"~","~0");
    replace_substring(s,"/","~1");
    returns;
    }

    staticvoidunescape(std::string&s)
    {
    replace_substring(s,"~1","/");
    replace_substring(s,"~0","~");
    }

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/input/position_t.hpp>

    #include<cstddef>//size_t

    namespacenlohmann
    {
    namespacedetail
    {
    structposition_t
    {
    std::size_tchars_read_total=0;
    std::size_tchars_read_current_line=0;
    std::size_tlines_read=0;

    constexproperatorsize_t()const
    {
    returnchars_read_total;
    }
    };

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //exceptions//

    classexception:publicstd::exception
    {
    public:
    constchar*what()constnoexceptoverride
    {
    returnm.what();
    }

    constintid;//NOLINT(cppcoreguidelines-non-private-member-variables-in-classes)

    protected:
    JSON_HEDLEY_NON_NULL(3)
    exception(intid_,constchar*what_arg):id(id_),m(what_arg){}

    staticstd::stringname(conststd::string&ename,intid_)
    {
    return"[json.exception."+ename+"."+std::to_string(id_)+"]";
    }

    template<typenameBasicJsonType>
    staticstd::stringdiagnostics(constBasicJsonType&leaf_element)
    {
    #ifJSON_DIAGNOSTICS
    std::vector<std::string>tokens;
    for(constauto*current=&leaf_element;current->m_parent!=nullptr;current=current->m_parent)
    {
    switch(current->m_parent->type())
    {
    casevalue_t::array:
    {
    for(std::size_ti=0;i<current->m_parent->m_value.array->size();++i)
    {
    if(&current->m_parent->m_value.array->operator[](i)==current)
    {
    tokens.emplace_back(std::to_string(i));
    break;
    }
    }
    break;
    }

    casevalue_t::object:
    {
    for(constauto&element:*current->m_parent->m_value.object)
    {
    if(&element.second==current)
    {
    tokens.emplace_back(element.first.c_str());
    break;
    }
    }
    break;
    }

    default://LCOV_EXCL_LINE
    break;//LCOV_EXCL_LINE
    }
    }

    if(tokens.empty())
    {
    return"";
    }

    return"("+std::accumulate(tokens.rbegin(),tokens.rend(),std::string{},
    [](conststd::string&a,conststd::string&b)
    {
    returna+"/"+detail::escape(b);
    })+")";
    #else
    static_cast<void>(leaf_element);
    return"";
    #endif
    }

    private:
    std::runtime_errorm;
    };

    classparse_error:publicexception
    {
    public:
    template<typenameBasicJsonType>
    staticparse_errorcreate(intid_,constposition_t&pos,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("parse_error",id_)+"parseerror"+
    position_string(pos)+":"+exception::diagnostics(context)+what_arg;
    returnparse_error(id_,pos.chars_read_total,w.c_str());
    }

    template<typenameBasicJsonType>
    staticparse_errorcreate(intid_,std::size_tbyte_,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("parse_error",id_)+"parseerror"+
    (byte_!=0?("atbyte"+std::to_string(byte_)):"")+
    ":"+exception::diagnostics(context)+what_arg;
    returnparse_error(id_,byte_,w.c_str());
    }

    conststd::size_tbyte;

    private:
    parse_error(intid_,std::size_tbyte_,constchar*what_arg)
    :exception(id_,what_arg),byte(byte_){}

    staticstd::stringposition_string(constposition_t&pos)
    {
    return"atline"+std::to_string(pos.lines_read+1)+
    ",column"+std::to_string(pos.chars_read_current_line);
    }
    };

    classinvalid_iterator:publicexception
    {
    public:
    template<typenameBasicJsonType>
    staticinvalid_iteratorcreate(intid_,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("invalid_iterator",id_)+exception::diagnostics(context)+what_arg;
    returninvalid_iterator(id_,w.c_str());
    }

    private:
    JSON_HEDLEY_NON_NULL(3)
    invalid_iterator(intid_,constchar*what_arg)
    :exception(id_,what_arg){}
    };

    classtype_error:publicexception
    {
    public:
    template<typenameBasicJsonType>
    statictype_errorcreate(intid_,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("type_error",id_)+exception::diagnostics(context)+what_arg;
    returntype_error(id_,w.c_str());
    }

    private:
    JSON_HEDLEY_NON_NULL(3)
    type_error(intid_,constchar*what_arg):exception(id_,what_arg){}
    };

    classout_of_range:publicexception
    {
    public:
    template<typenameBasicJsonType>
    staticout_of_rangecreate(intid_,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("out_of_range",id_)+exception::diagnostics(context)+what_arg;
    returnout_of_range(id_,w.c_str());
    }

    private:
    JSON_HEDLEY_NON_NULL(3)
    out_of_range(intid_,constchar*what_arg):exception(id_,what_arg){}
    };

    classother_error:publicexception
    {
    public:
    template<typenameBasicJsonType>
    staticother_errorcreate(intid_,conststd::string&what_arg,constBasicJsonType&context)
    {
    std::stringw=exception::name("other_error",id_)+exception::diagnostics(context)+what_arg;
    returnother_error(id_,w.c_str());
    }

    private:
    JSON_HEDLEY_NON_NULL(3)
    other_error(intid_,constchar*what_arg):exception(id_,what_arg){}
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    #include<cstddef>//size_t
    #include<type_traits>//conditional,enable_if,false_type,integral_constant,is_constructible,is_integral,is_same,remove_cv,remove_reference,true_type
    #include<utility>//index_sequence,make_index_sequence,index_sequence_for

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {

    template<typenameT>
    usinguncvref_t=typenamestd::remove_cv<typenamestd::remove_reference<T>::type>::type;

    #ifdefJSON_HAS_CPP_14

    //thefollowingutilitiesarenativelyavailableinC++14
    usingstd::enable_if_t;
    usingstd::index_sequence;
    usingstd::make_index_sequence;
    usingstd::index_sequence_for;

    #else

    //aliastemplatestoreduceboilerplate
    template<boolB,typenameT=void>
    usingenable_if_t=typenamestd::enable_if<B,T>::type;

    //Thefollowingcodeistakenfromhttps://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h
    //whichispartofGoogleAbseil(https://github.com/abseil/abseil-cpp),licensedundertheApacheLicense2.0.

    //integer_sequence
    //
    //Classtemplaterepresentingacompile-timeintegersequence.Aninstantiation
    //of`integer_sequence<T,Ints...>`hasasequenceofintegersencodedinits
    //typethroughitstemplatearguments(whichisacommonneedwhen
    //workingwithC++11variadictemplates).`absl::integer_sequence`isdesigned
    //tobeadrop-inreplacementforC++14's`std::integer_sequence`.
    //
    //Example:
    //
    //template<classT,T...Ints>
    //voiduser_function(integer_sequence<T,Ints...>);
    //
    //intmain()
    //{
    ////user_function's`T`willbededucedto`int`and`Ints...`
    ////willbededucedto`0,1,2,3,4`.
    //user_function(make_integer_sequence<int,5>());
    //}
    template<typenameT,T...Ints>
    structinteger_sequence
    {
    usingvalue_type=T;
    staticconstexprstd::size_tsize()noexcept
    {
    returnsizeof...(Ints);
    }
    };

    //index_sequence
    //
    //Ahelpertemplateforan`integer_sequence`of`size_t`,
    //`absl::index_sequence`isdesignedtobeadrop-inreplacementforC++14's
    //`std::index_sequence`.
    template<size_t...Ints>
    usingindex_sequence=integer_sequence<size_t,Ints...>;

    namespaceutility_internal
    {

    template<typenameSeq,size_tSeqSize,size_tRem>
    structExtend;

    //NotethatSeqSize==sizeof...(Ints).It'spassedexplicitlyforefficiency.
    template<typenameT,T...Ints,size_tSeqSize>
    structExtend<integer_sequence<T,Ints...>,SeqSize,0>
    {
    usingtype=integer_sequence<T,Ints...,(Ints+SeqSize)...>;
    };

    template<typenameT,T...Ints,size_tSeqSize>
    structExtend<integer_sequence<T,Ints...>,SeqSize,1>
    {
    usingtype=integer_sequence<T,Ints...,(Ints+SeqSize)...,2*SeqSize>;
    };

    //Recursionhelperfor'make_integer_sequence<T,N>'.
    //'Gen<T,N>::type'isanaliasfor'integer_sequence<T,0,1,...N-1>'.
    template<typenameT,size_tN>
    structGen
    {
    usingtype=
    typenameExtend<typenameGen<T,N/2>::type,N/2,N%2>::type;
    };

    template<typenameT>
    structGen<T,0>
    {
    usingtype=integer_sequence<T>;
    };

    }//namespaceutility_internal

    //Compile-timesequencesofintegers

    //make_integer_sequence
    //
    //Thistemplatealiasisequivalentto
    //`integer_sequence<int,0,1,...,N-1>`,andisdesignedtobeadrop-in
    //replacementforC++14's`std::make_integer_sequence`.
    template<typenameT,TN>
    usingmake_integer_sequence=typenameutility_internal::Gen<T, N>::type;

    //make_index_sequence
    //
    //Thistemplatealiasisequivalentto`index_sequence<0,1,...,N-1>`,
    //andisdesignedtobeadrop-inreplacementforC++14's
    //`std::make_index_sequence`.
    template<size_tN>
    usingmake_index_sequence=make_integer_sequence<size_t, N>;

    //index_sequence_for
    //
    //Convertsatypenamepackintoanindexsequenceofthesamelength,and
    //isdesignedtobeadrop-inreplacementforC++14's
    //`std::index_sequence_for()`
    template<typename...Ts>
    usingindex_sequence_for=make_index_sequence<sizeof...(Ts)>;

    #endif

    //dispatchutility(takenfromranges-v3)
    template<unsignedN>structpriority_tag:priority_tag<N-1>{};
    template<>structpriority_tag<0>{};

    //takenfromranges-v3
    template<typenameT>
    structstatic_const
    {
    staticconstexprTvalue{};
    };

    template<typenameT>
    constexprTstatic_const<T>::value;

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/meta/identity_tag.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //dispatchinghelperstruct
    template<classT>structidentity_tag{};
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/meta/type_traits.hpp>

    #include<limits>//numeric_limits
    #include<type_traits>//false_type,is_constructible,is_integral,is_same,true_type
    #include<utility>//declval
    #include<tuple>//tuple

    //#include<nlohmann/detail/iterators/iterator_traits.hpp>

    #include<iterator>//random_access_iterator_tag

    //#include<nlohmann/detail/meta/void_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typename...Ts>structmake_void
    {
    usingtype=void;
    };
    template<typename...Ts>usingvoid_t=typenamemake_void<Ts...>::type;
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameIt,typename=void>
    structiterator_types{};

    template<typenameIt>
    structiterator_types<
    It,
    void_t<typenameIt::difference_type,typenameIt::value_type,typenameIt::pointer,
    typenameIt::reference,typenameIt::iterator_category>>
    {
    usingdifference_type=typenameIt::difference_type;
    usingvalue_type=typenameIt::value_type;
    usingpointer=typenameIt::pointer;
    usingreference=typenameIt::reference;
    usingiterator_category=typenameIt::iterator_category;
    };

    //Thisisrequiredassomecompilersimplementstd::iterator_traitsinawaythat
    //doesn'tworkwithSFINAE.Seehttps://github.com/nlohmann/json/issues/1341.
    template<typenameT,typename=void>
    structiterator_traits
    {
    };

    template<typenameT>
    structiterator_traits<T,enable_if_t<!std::is_pointer<T>::value>>
    :iterator_types<T>
    {
    };

    template<typenameT>
    structiterator_traits<T*,enable_if_t<std::is_object<T>::value>>
    {
    usingiterator_category=std::random_access_iterator_tag;
    usingvalue_type=T;
    usingdifference_type=ptrdiff_t;
    usingpointer=T*;
    usingreference=T&;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    //#include<nlohmann/detail/meta/detected.hpp>

    #include<type_traits>

    //#include<nlohmann/detail/meta/void_t.hpp>

    //https://en.cppreference.com/w/cpp/experimental/is_detected
    namespacenlohmann
    {
    namespacedetail
    {
    structnonesuch
    {
    nonesuch()=delete;
    ~nonesuch()=delete;
    nonesuch(nonesuchconst&)=delete;
    nonesuch(nonesuchconst&&)=delete;
    voidoperator=(nonesuchconst&)=delete;
    voidoperator=(nonesuch&&)=delete;
    };

    template<classDefault,
    classAlwaysVoid,
    template<class...>classOp,
    class...Args>
    structdetector
    {
    usingvalue_t=std::false_type;
    usingtype=Default;
    };

    template<classDefault,template<class...>classOp,class...Args>
    structdetector<Default,void_t<Op<Args...>>,Op,Args...>
    {
    usingvalue_t=std::true_type;
    usingtype=Op<Args...>;
    };

    template<template<class...>classOp,class...Args>
    usingis_detected=typenamedetector<nonesuch,void,Op,Args...>::value_t;

    template<template<class...>classOp,class...Args>
    usingdetected_t=typenamedetector<nonesuch,void,Op,Args...>::type;

    template<classDefault,template<class...>classOp,class...Args>
    usingdetected_or=detector<Default,void,Op,Args...>;

    template<classDefault,template<class...>classOp,class...Args>
    usingdetected_or_t=typenamedetected_or<Default,Op,Args...>::type;

    template<classExpected,template<class...>classOp,class...Args>
    usingis_detected_exact=std::is_same<Expected,detected_t<Op,Args...>>;

    template<classTo,template<class...>classOp,class...Args>
    usingis_detected_convertible=
    std::is_convertible<detected_t<Op,Args...>,To>;
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/json_fwd.hpp>
    #ifndefINCLUDE_NLOHMANN_JSON_FWD_HPP_
    #defineINCLUDE_NLOHMANN_JSON_FWD_HPP_

    #include<cstdint>//int64_t,uint64_t
    #include<map>//map
    #include<memory>//allocator
    #include<string>//string
    #include<vector>//vector

    namespacenlohmann
    {
    template<typenameT=void,typenameSFINAE=void>
    structadl_serializer;

    template<template<typenameU,typenameV,typename...Args>classObjectType=
    std::map,
    template<typenameU,typename...Args>classArrayType=std::vector,
    classStringType=std::string,classBooleanType=bool,
    classNumberIntegerType=std::int64_t,
    classNumberUnsignedType=std::uint64_t,
    classNumberFloatType=double,
    template<typenameU>classAllocatorType=std::allocator,
    template<typenameT,typenameSFINAE=void>classJSONSerializer=
    adl_serializer,
    classBinaryType=std::vector<std::uint8_t>>
    classbasic_json;

    template<typenameBasicJsonType>
    classjson_pointer;

    usingjson=basic_json<>;

    template<classKey,classT,classIgnoredLess,classAllocator>
    structordered_map;

    usingordered_json=basic_json<nlohmann::ordered_map>;

    }//namespacenlohmann

    #endif//INCLUDE_NLOHMANN_JSON_FWD_HPP_

    namespacenlohmann
    {
    namespacedetail
    {
    //helpers//

    //Notetomaintainers:
    //
    //EverytraitinthisfileexpectsanonCV-qualifiedtype.
    //Theonlyexceptionsareinthe'aliasesfordetected'section
    //(i.e.thoseoftheform:decltype(T::member_function(std::declval<T>())))
    //
    //Inthiscase,ThastobeproperlyCV-qualifiedtoconstraintthefunctionarguments
    //(e.g.to_json(BasicJsonType&,constT&))

    template<typename>structis_basic_json:std::false_type{};

    NLOHMANN_BASIC_JSON_TPL_DECLARATION
    structis_basic_json<NLOHMANN_BASIC_JSON_TPL>:std::true_type{};

    //json_refhelpers//

    template<typename>
    classjson_ref;

    template<typename>
    structis_json_ref:std::false_type{};

    template<typenameT>
    structis_json_ref<json_ref<T>>:std::true_type{};

    //aliasesfordetected//

    template<typenameT>
    usingmapped_type_t=typenameT::mapped_type;

    template<typenameT>
    usingkey_type_t=typenameT::key_type;

    template<typenameT>
    usingvalue_type_t=typenameT::value_type;

    template<typenameT>
    usingdifference_type_t=typenameT::difference_type;

    template<typenameT>
    usingpointer_t=typenameT::pointer;

    template<typenameT>
    usingreference_t=typenameT::reference;

    template<typenameT>
    usingiterator_category_t=typenameT::iterator_category;

    template<typenameT>
    usingiterator_t=typenameT::iterator;

    template<typenameT,typename...Args>
    usingto_json_function=decltype(T::to_json(std::declval<Args>()...));

    template<typenameT,typename...Args>
    usingfrom_json_function=decltype(T::from_json(std::declval<Args>()...));

    template<typenameT,typenameU>
    usingget_template_function=decltype(std::declval<T>().templateget<U>());

    //traitcheckingifJSONSerializer<T>::from_json(jsonconst&,udt&)exists
    template<typenameBasicJsonType,typenameT,typename=void>
    structhas_from_json:std::false_type{};

    //traitcheckingifj.get<T>isvalid
    //usethistraitinsteadofstd::is_constructibleorstd::is_convertible,
    //bothrelyon,ormakeuseofimplicitconversions,andthusfailwhenT
    //hasseveralconstructors/operator=(seehttps://github.com/nlohmann/json/issues/958)
    template<typenameBasicJsonType,typenameT>
    structis_getable
    {
    staticconstexprboolvalue=is_detected<get_template_function, const BasicJsonType&, T>::value;
    };

    template<typenameBasicJsonType,typenameT>
    structhas_from_json<BasicJsonType,T,enable_if_t<!is_basic_json<T>::value>>
    {
    usingserializer=typenameBasicJsonType::templatejson_serializer<T,void>;

    staticconstexprboolvalue=
    is_detected_exact<void,from_json_function,serializer,
    constBasicJsonType&,T&>::value;
    };

    //ThistraitchecksifJSONSerializer<T>::from_json(jsonconst&)exists
    //thisoverloadisusedfornon-default-constructibleuser-defined-types
    template<typenameBasicJsonType,typenameT,typename=void>
    structhas_non_default_from_json:std::false_type{};

    template<typenameBasicJsonType,typenameT>
    structhas_non_default_from_json<BasicJsonType,T,enable_if_t<!is_basic_json<T>::value>>
    {
    usingserializer=typenameBasicJsonType::templatejson_serializer<T,void>;

    staticconstexprboolvalue=
    is_detected_exact<T,from_json_function,serializer,
    constBasicJsonType&>::value;
    };

    //ThistraitchecksifBasicJsonType::json_serializer<T>::to_jsonexists
    //DonotevaluatethetraitwhenTisabasic_jsontype,toavoidtemplateinstantiationinfiniterecursion.
    template<typenameBasicJsonType,typenameT,typename=void>
    structhas_to_json:std::false_type{};

    template<typenameBasicJsonType,typenameT>
    structhas_to_json<BasicJsonType,T,enable_if_t<!is_basic_json<T>::value>>
    {
    usingserializer=typenameBasicJsonType::templatejson_serializer<T,void>;

    staticconstexprboolvalue=
    is_detected_exact<void,to_json_function,serializer,BasicJsonType&,
    T>::value;
    };

    //is_functions//

    //https://en.cppreference.com/w/cpp/types/conjunction
    template<class...>structconjunction:std::true_type{};
    template<classB1>structconjunction<B1>:B1{};
    template<classB1,class...Bn>
    structconjunction<B1,Bn...>
    :std::conditional<bool(B1::value),conjunction<Bn...>,B1>::type{};

    //Reimplementationofis_constructibleandis_default_constructible,duetothembeingbrokenfor
    //std::pairandstd::tupleuntilLWG2367fix(seehttps://cplusplus.github.io/LWG/lwg-defects.html#2367).
    //Thiscausescompileerrorsine.g.clang3.5orgcc4.9.
    template<typenameT>
    structis_default_constructible:std::is_default_constructible<T>{};

    template<typenameT1,typenameT2>
    structis_default_constructible<std::pair<T1,T2>>
    :conjunction<is_default_constructible<T1>,is_default_constructible<T2>>{};

    template<typenameT1,typenameT2>
    structis_default_constructible<conststd::pair<T1,T2>>
    :conjunction<is_default_constructible<T1>,is_default_constructible<T2>>{};

    template<typename...Ts>
    structis_default_constructible<std::tuple<Ts...>>
    :conjunction<is_default_constructible<Ts>...>{};

    template<typename...Ts>
    structis_default_constructible<conststd::tuple<Ts...>>
    :conjunction<is_default_constructible<Ts>...>{};

    template<typenameT,typename...Args>
    structis_constructible:std::is_constructible<T,Args...>{};

    template<typenameT1,typenameT2>
    structis_constructible<std::pair<T1,T2>>:is_default_constructible<std::pair<T1,T2>>{};

    template<typenameT1,typenameT2>
    structis_constructible<conststd::pair<T1,T2>>:is_default_constructible<conststd::pair<T1,T2>>{};

    template<typename...Ts>
    structis_constructible<std::tuple<Ts...>>:is_default_constructible<std::tuple<Ts...>>{};

    template<typename...Ts>
    structis_constructible<conststd::tuple<Ts...>>:is_default_constructible<conststd::tuple<Ts...>>{};

    template<typenameT,typename=void>
    structis_iterator_traits:std::false_type{};

    template<typenameT>
    structis_iterator_traits<iterator_traits<T>>
    {
    private:
    usingtraits=iterator_traits<T>;

    public:
    staticconstexprautovalue=
    is_detected<value_type_t, traits>::value&&
    is_detected<difference_type_t, traits>::value&&
    is_detected<pointer_t, traits>::value&&
    is_detected<iterator_category_t, traits>::value&&
    is_detected<reference_t, traits>::value;
    };

    //Thefollowingimplementationofis_complete_typeistakenfrom
    //https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/
    //andiswrittenbyXiangFanwhoagreedtousingitinthislibrary.

    template<typenameT,typename=void>
    structis_complete_type:std::false_type{};

    template<typenameT>
    structis_complete_type<T,decltype(void(sizeof(T)))>:std::true_type{};

    template<typenameBasicJsonType,typenameCompatibleObjectType,
    typename=void>
    structis_compatible_object_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameCompatibleObjectType>
    structis_compatible_object_type_impl<
    BasicJsonType,CompatibleObjectType,
    enable_if_t<is_detected<mapped_type_t,CompatibleObjectType>::value&&
    is_detected<key_type_t,CompatibleObjectType>::value>>
    {
    usingobject_t=typenameBasicJsonType::object_t;

    //macOS'sis_constructibledoesnotplaywellwithnonesuch...
    staticconstexprboolvalue=
    is_constructible<typenameobject_t::key_type,
    typenameCompatibleObjectType::key_type>::value&&
    is_constructible<typenameobject_t::mapped_type,
    typenameCompatibleObjectType::mapped_type>::value;
    };

    template<typenameBasicJsonType,typenameCompatibleObjectType>
    structis_compatible_object_type
    :is_compatible_object_type_impl<BasicJsonType,CompatibleObjectType>{};

    template<typenameBasicJsonType,typenameConstructibleObjectType,
    typename=void>
    structis_constructible_object_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameConstructibleObjectType>
    structis_constructible_object_type_impl<
    BasicJsonType,ConstructibleObjectType,
    enable_if_t<is_detected<mapped_type_t,ConstructibleObjectType>::value&&
    is_detected<key_type_t,ConstructibleObjectType>::value>>
    {
    usingobject_t=typenameBasicJsonType::object_t;

    staticconstexprboolvalue=
    (is_default_constructible<ConstructibleObjectType>::value&&
    (std::is_move_assignable<ConstructibleObjectType>::value||
    std::is_copy_assignable<ConstructibleObjectType>::value)&&
    (is_constructible<typenameConstructibleObjectType::key_type,
    typenameobject_t::key_type>::value&&
    std::is_same<
    typenameobject_t::mapped_type,
    typenameConstructibleObjectType::mapped_type>::value))||
    (has_from_json<BasicJsonType,
    typenameConstructibleObjectType::mapped_type>::value||
    has_non_default_from_json<
    BasicJsonType,
    typenameConstructibleObjectType::mapped_type>::value);
    };

    template<typenameBasicJsonType,typenameConstructibleObjectType>
    structis_constructible_object_type
    :is_constructible_object_type_impl<BasicJsonType,
    ConstructibleObjectType>{};

    template<typenameBasicJsonType,typenameCompatibleStringType,
    typename=void>
    structis_compatible_string_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameCompatibleStringType>
    structis_compatible_string_type_impl<
    BasicJsonType,CompatibleStringType,
    enable_if_t<is_detected_exact<typenameBasicJsonType::string_t::value_type,
    value_type_t,CompatibleStringType>::value>>
    {
    staticconstexprautovalue=
    is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value;
    };

    template<typenameBasicJsonType,typenameConstructibleStringType>
    structis_compatible_string_type
    :is_compatible_string_type_impl<BasicJsonType,ConstructibleStringType>{};

    template<typenameBasicJsonType,typenameConstructibleStringType,
    typename=void>
    structis_constructible_string_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameConstructibleStringType>
    structis_constructible_string_type_impl<
    BasicJsonType,ConstructibleStringType,
    enable_if_t<is_detected_exact<typenameBasicJsonType::string_t::value_type,
    value_type_t,ConstructibleStringType>::value>>
    {
    staticconstexprautovalue=
    is_constructible<ConstructibleStringType,
    typenameBasicJsonType::string_t>::value;
    };

    template<typenameBasicJsonType,typenameConstructibleStringType>
    structis_constructible_string_type
    :is_constructible_string_type_impl<BasicJsonType,ConstructibleStringType>{};

    template<typenameBasicJsonType,typenameCompatibleArrayType,typename=void>
    structis_compatible_array_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameCompatibleArrayType>
    structis_compatible_array_type_impl<
    BasicJsonType,CompatibleArrayType,
    enable_if_t<is_detected<value_type_t,CompatibleArrayType>::value&&
    is_detected<iterator_t,CompatibleArrayType>::value&&
    //Thisisneededbecausejson_reverse_iteratorhasa::iteratortype...
    //ThereforeitisdetectedasaCompatibleArrayType.
    //TherealfixwouldbetohaveanIterableconcept.
    !is_iterator_traits<
    iterator_traits<CompatibleArrayType>>::value>>
    {
    staticconstexprboolvalue=
    is_constructible<BasicJsonType,
    typenameCompatibleArrayType::value_type>::value;
    };

    template<typenameBasicJsonType,typenameCompatibleArrayType>
    structis_compatible_array_type
    :is_compatible_array_type_impl<BasicJsonType,CompatibleArrayType>{};

    template<typenameBasicJsonType,typenameConstructibleArrayType,typename=void>
    structis_constructible_array_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameConstructibleArrayType>
    structis_constructible_array_type_impl<
    BasicJsonType,ConstructibleArrayType,
    enable_if_t<std::is_same<ConstructibleArrayType,
    typenameBasicJsonType::value_type>::value>>
    :std::true_type{};

    template<typenameBasicJsonType,typenameConstructibleArrayType>
    structis_constructible_array_type_impl<
    BasicJsonType,ConstructibleArrayType,
    enable_if_t<!std::is_same<ConstructibleArrayType,
    typenameBasicJsonType::value_type>::value&&
    is_default_constructible<ConstructibleArrayType>::value&&
    (std::is_move_assignable<ConstructibleArrayType>::value||
    std::is_copy_assignable<ConstructibleArrayType>::value)&&
    is_detected<value_type_t,ConstructibleArrayType>::value&&
    is_detected<iterator_t,ConstructibleArrayType>::value&&
    is_complete_type<
    detected_t<value_type_t,ConstructibleArrayType>>::value>>
    {
    staticconstexprboolvalue=
    //Thisisneededbecausejson_reverse_iteratorhasa::iteratortype,
    //furthermore,std::back_insert_iterator(andotheriterators)havea
    //baseclass`iterator`...Thereforeitisdetectedasa
    //ConstructibleArrayType.TherealfixwouldbetohaveanIterable
    //concept.
    !is_iterator_traits<iterator_traits<ConstructibleArrayType>>::value&&

    (std::is_same<typenameConstructibleArrayType::value_type,
    typenameBasicJsonType::array_t::value_type>::value||
    has_from_json<BasicJsonType,
    typenameConstructibleArrayType::value_type>::value||
    has_non_default_from_json<
    BasicJsonType,typenameConstructibleArrayType::value_type>::value);
    };

    template<typenameBasicJsonType,typenameConstructibleArrayType>
    structis_constructible_array_type
    :is_constructible_array_type_impl<BasicJsonType,ConstructibleArrayType>{};

    template<typenameRealIntegerType,typenameCompatibleNumberIntegerType,
    typename=void>
    structis_compatible_integer_type_impl:std::false_type{};

    template<typenameRealIntegerType,typenameCompatibleNumberIntegerType>
    structis_compatible_integer_type_impl<
    RealIntegerType,CompatibleNumberIntegerType,
    enable_if_t<std::is_integral<RealIntegerType>::value&&
    std::is_integral<CompatibleNumberIntegerType>::value&&
    !std::is_same<bool,CompatibleNumberIntegerType>::value>>
    {
    //isthereanassertsomewhereonoverflows?
    usingRealLimits=std::numeric_limits<RealIntegerType>;
    usingCompatibleLimits=std::numeric_limits<CompatibleNumberIntegerType>;

    staticconstexprautovalue=
    is_constructible<RealIntegerType,
    CompatibleNumberIntegerType>::value&&
    CompatibleLimits::is_integer&&
    RealLimits::is_signed==CompatibleLimits::is_signed;
    };

    template<typenameRealIntegerType,typenameCompatibleNumberIntegerType>
    structis_compatible_integer_type
    :is_compatible_integer_type_impl<RealIntegerType,
    CompatibleNumberIntegerType>{};

    template<typenameBasicJsonType,typenameCompatibleType,typename=void>
    structis_compatible_type_impl:std::false_type{};

    template<typenameBasicJsonType,typenameCompatibleType>
    structis_compatible_type_impl<
    BasicJsonType,CompatibleType,
    enable_if_t<is_complete_type<CompatibleType>::value>>
    {
    staticconstexprboolvalue=
    has_to_json<BasicJsonType, CompatibleType>::value;
    };

    template<typenameBasicJsonType,typenameCompatibleType>
    structis_compatible_type
    :is_compatible_type_impl<BasicJsonType,CompatibleType>{};

    template<typenameT1,typenameT2>
    structis_constructible_tuple:std::false_type{};

    template<typenameT1,typename...Args>
    structis_constructible_tuple<T1,std::tuple<Args...>>:conjunction<is_constructible<T1,Args>...>{};
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenamestd::nullptr_t&n)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_null()))
    {
    JSON_THROW(type_error::create(302,"typemustbenull,butis"+std::string(j.type_name()),j));
    }
    n=nullptr;
    }

    //overloadsforbasic_jsontemplateparameters
    template<typenameBasicJsonType,typenameArithmeticType,
    enable_if_t < std::is_arithmetic<ArithmeticType>::value&&
    !std::is_same<ArithmeticType,typenameBasicJsonType::boolean_t>::value,
    int>=0>
    voidget_arithmetic_value(constBasicJsonType&j,ArithmeticType&val)
    {
    switch(static_cast<value_t>(j))
    {
    casevalue_t::number_unsigned:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_unsigned_t*>());
    break;
    }
    casevalue_t::number_integer:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_integer_t*>());
    break;
    }
    casevalue_t::number_float:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_float_t*>());
    break;
    }

    default:
    JSON_THROW(type_error::create(302,"typemustbenumber,butis"+std::string(j.type_name()),j));
    }
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::boolean_t&b)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
    {
    JSON_THROW(type_error::create(302,"typemustbeboolean,butis"+std::string(j.type_name()),j));
    }
    b=*j.templateget_ptr<consttypenameBasicJsonType::boolean_t*>();
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::string_t&s)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_string()))
    {
    JSON_THROW(type_error::create(302,"typemustbestring,butis"+std::string(j.type_name()),j));
    }
    s=*j.templateget_ptr<consttypenameBasicJsonType::string_t*>();
    }

    template<
    typenameBasicJsonType,typenameConstructibleStringType,
    enable_if_t<
    is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value&&
    !std::is_same<typenameBasicJsonType::string_t,
    ConstructibleStringType>::value,
    int>=0>
    voidfrom_json(constBasicJsonType&j,ConstructibleStringType&s)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_string()))
    {
    JSON_THROW(type_error::create(302,"typemustbestring,butis"+std::string(j.type_name()),j));
    }

    s=*j.templateget_ptr<consttypenameBasicJsonType::string_t*>();
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::number_float_t&val)
    {
    get_arithmetic_value(j,val);
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::number_unsigned_t&val)
    {
    get_arithmetic_value(j,val);
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::number_integer_t&val)
    {
    get_arithmetic_value(j,val);
    }

    template<typenameBasicJsonType,typenameEnumType,
    enable_if_t<std::is_enum<EnumType>::value,int>=0>
    voidfrom_json(constBasicJsonType&j,EnumType&e)
    {
    typenamestd::underlying_type<EnumType>::typeval;
    get_arithmetic_value(j,val);
    e=static_cast<EnumType>(val);
    }

    //forward_listdoesn'thaveaninsertmethod
    template<typenameBasicJsonType,typenameT,typenameAllocator,
    enable_if_t<is_getable<BasicJsonType, T>::value,int>=0>
    voidfrom_json(constBasicJsonType&j,std::forward_list<T,Allocator>&l)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }
    l.clear();
    std::transform(j.rbegin(),j.rend(),
    std::front_inserter(l),[](constBasicJsonType&i)
    {
    returni.templateget<T>();
    });
    }

    //valarraydoesn'thaveaninsertmethod
    template<typenameBasicJsonType,typenameT,
    enable_if_t<is_getable<BasicJsonType,T>::value,int>=0>
    voidfrom_json(constBasicJsonType&j,std::valarray<T>&l)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }
    l.resize(j.size());
    std::transform(j.begin(),j.end(),std::begin(l),
    [](constBasicJsonType&elem)
    {
    returnelem.templateget<T>();
    });
    }

    template<typenameBasicJsonType,typenameT,std::size_tN>
    autofrom_json(constBasicJsonType&j,T(&arr)[N])//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    ->decltype(j.templateget<T>(),void())
    {
    for(std::size_ti=0;i<N;++i)
    {
    arr[i]=j.at(i).templateget<T>();
    }
    }

    template<typenameBasicJsonType>
    voidfrom_json_array_impl(constBasicJsonType&j,typenameBasicJsonType::array_t&arr,priority_tag<3>/*unused*/)
    {
    arr=*j.templateget_ptr<consttypenameBasicJsonType::array_t*>();
    }

    template<typenameBasicJsonType,typenameT,std::size_tN>
    autofrom_json_array_impl(constBasicJsonType&j,std::array<T,N>&arr,
    priority_tag<2>/*unused*/)
    ->decltype(j.templateget<T>(),void())
    {
    for(std::size_ti=0;i<N;++i)
    {
    arr[i]=j.at(i).templateget<T>();
    }
    }

    template<typenameBasicJsonType,typenameConstructibleArrayType,
    enable_if_t<
    std::is_assignable<ConstructibleArrayType&,ConstructibleArrayType>::value,
    int>=0>
    autofrom_json_array_impl(constBasicJsonType&j,ConstructibleArrayType&arr,priority_tag<1>/*unused*/)
    ->decltype(
    arr.reserve(std::declval<typenameConstructibleArrayType::size_type>()),
    j.templateget<typenameConstructibleArrayType::value_type>(),
    void())
    {
    usingstd::end;

    ConstructibleArrayTyperet;
    ret.reserve(j.size());
    std::transform(j.begin(),j.end(),
    std::inserter(ret,end(ret)),[](constBasicJsonType&i)
    {
    //get<BasicJsonType>()returns*this,thiswon'tcallafrom_json
    //methodwhenvalue_typeisBasicJsonType
    returni.templateget<typenameConstructibleArrayType::value_type>();
    });
    arr=std::move(ret);
    }

    template<typenameBasicJsonType,typenameConstructibleArrayType,
    enable_if_t<
    std::is_assignable<ConstructibleArrayType&,ConstructibleArrayType>::value,
    int>=0>
    voidfrom_json_array_impl(constBasicJsonType&j,ConstructibleArrayType&arr,
    priority_tag<0>/*unused*/)
    {
    usingstd::end;

    ConstructibleArrayTyperet;
    std::transform(
    j.begin(),j.end(),std::inserter(ret,end(ret)),
    [](constBasicJsonType&i)
    {
    //get<BasicJsonType>()returns*this,thiswon'tcallafrom_json
    //methodwhenvalue_typeisBasicJsonType
    returni.templateget<typenameConstructibleArrayType::value_type>();
    });
    arr=std::move(ret);
    }

    template<typenameBasicJsonType,typenameConstructibleArrayType,
    enable_if_t<
    is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value&&
    !is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value&&
    !is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value&&
    !std::is_same<ConstructibleArrayType,typenameBasicJsonType::binary_t>::value&&
    !is_basic_json<ConstructibleArrayType>::value,
    int>=0>
    autofrom_json(constBasicJsonType&j,ConstructibleArrayType&arr)
    ->decltype(from_json_array_impl(j,arr,priority_tag<3>{}),
    j.templateget<typenameConstructibleArrayType::value_type>(),
    void())
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }

    from_json_array_impl(j,arr,priority_tag<3>{});
    }

    template<typenameBasicJsonType,typenameT,std::size_t...Idx>
    std::array<T,sizeof...(Idx)>from_json_inplace_array_impl(BasicJsonType&&j,
    identity_tag<std::array<T,sizeof...(Idx)>>/*unused*/,index_sequence<Idx...>/*unused*/)
    {
    return{{std::forward<BasicJsonType>(j).at(Idx).templateget<T>()...}};
    }

    template<typenameBasicJsonType,typenameT,std::size_tN>
    autofrom_json(BasicJsonType&&j,identity_tag<std::array<T,N>>tag)
    ->decltype(from_json_inplace_array_impl(std::forward<BasicJsonType>(j),tag,make_index_sequence<N>{}))
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }

    returnfrom_json_inplace_array_impl(std::forward<BasicJsonType>(j),tag,make_index_sequence<N>{});
    }

    template<typenameBasicJsonType>
    voidfrom_json(constBasicJsonType&j,typenameBasicJsonType::binary_t&bin)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_binary()))
    {
    JSON_THROW(type_error::create(302,"typemustbebinary,butis"+std::string(j.type_name()),j));
    }

    bin=*j.templateget_ptr<consttypenameBasicJsonType::binary_t*>();
    }

    template<typenameBasicJsonType,typenameConstructibleObjectType,
    enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value,int>=0>
    voidfrom_json(constBasicJsonType&j,ConstructibleObjectType&obj)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_object()))
    {
    JSON_THROW(type_error::create(302,"typemustbeobject,butis"+std::string(j.type_name()),j));
    }

    ConstructibleObjectTyperet;
    constauto*inner_object=j.templateget_ptr<consttypenameBasicJsonType::object_t*>();
    usingvalue_type=typenameConstructibleObjectType::value_type;
    std::transform(
    inner_object->begin(),inner_object->end(),
    std::inserter(ret,ret.begin()),
    [](typenameBasicJsonType::object_t::value_typeconst&p)
    {
    returnvalue_type(p.first,p.second.templateget<typenameConstructibleObjectType::mapped_type>());
    });
    obj=std::move(ret);
    }

    //overloadforarithmetictypes,notchosenforbasic_jsontemplatearguments
    //(BooleanType,etc..);note:Isitreallynecessarytoprovideexplicit
    //overloadsforboolean_tetc.incaseofacustomBooleanTypewhichisnot
    //anarithmetictype?
    template<typenameBasicJsonType,typenameArithmeticType,
    enable_if_t<
    std::is_arithmetic<ArithmeticType>::value&&
    !std::is_same<ArithmeticType,typenameBasicJsonType::number_unsigned_t>::value&&
    !std::is_same<ArithmeticType,typenameBasicJsonType::number_integer_t>::value&&
    !std::is_same<ArithmeticType,typenameBasicJsonType::number_float_t>::value&&
    !std::is_same<ArithmeticType,typenameBasicJsonType::boolean_t>::value,
    int>=0>
    voidfrom_json(constBasicJsonType&j,ArithmeticType&val)
    {
    switch(static_cast<value_t>(j))
    {
    casevalue_t::number_unsigned:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_unsigned_t*>());
    break;
    }
    casevalue_t::number_integer:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_integer_t*>());
    break;
    }
    casevalue_t::number_float:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::number_float_t*>());
    break;
    }
    casevalue_t::boolean:
    {
    val=static_cast<ArithmeticType>(*j.templateget_ptr<consttypenameBasicJsonType::boolean_t*>());
    break;
    }

    default:
    JSON_THROW(type_error::create(302,"typemustbenumber,butis"+std::string(j.type_name()),j));
    }
    }

    template<typenameBasicJsonType,typename...Args,std::size_t...Idx>
    std::tuple<Args...>from_json_tuple_impl_base(BasicJsonType&&j,index_sequence<Idx...>/*unused*/)
    {
    returnstd::make_tuple(std::forward<BasicJsonType>(j).at(Idx).templateget<Args>()...);
    }

    template<typenameBasicJsonType,classA1,classA2>
    std::pair<A1,A2>from_json_tuple_impl(BasicJsonType&&j,identity_tag<std::pair<A1,A2>>/*unused*/,priority_tag<0>/*unused*/)
    {
    return{std::forward<BasicJsonType>(j).at(0).templateget<A1>(),
    std::forward<BasicJsonType>(j).at(1).templateget<A2>()};
    }

    template<typenameBasicJsonType,typenameA1,typenameA2>
    voidfrom_json_tuple_impl(BasicJsonType&&j,std::pair<A1,A2>&p,priority_tag<1>/*unused*/)
    {
    p=from_json_tuple_impl(std::forward<BasicJsonType>(j),identity_tag<std::pair<A1,A2>>{},priority_tag<0>{});
    }

    template<typenameBasicJsonType,typename...Args>
    std::tuple<Args...>from_json_tuple_impl(BasicJsonType&&j,identity_tag<std::tuple<Args...>>/*unused*/,priority_tag<2>/*unused*/)
    {
    returnfrom_json_tuple_impl_base<BasicJsonType,Args...>(std::forward<BasicJsonType>(j),index_sequence_for<Args...>{});
    }

    template<typenameBasicJsonType,typename...Args>
    voidfrom_json_tuple_impl(BasicJsonType&&j,std::tuple<Args...>&t,priority_tag<3>/*unused*/)
    {
    t=from_json_tuple_impl_base<BasicJsonType,Args...>(std::forward<BasicJsonType>(j),index_sequence_for<Args...>{});
    }

    template<typenameBasicJsonType,typenameTupleRelated>
    autofrom_json(BasicJsonType&&j,TupleRelated&&t)
    ->decltype(from_json_tuple_impl(std::forward<BasicJsonType>(j),std::forward<TupleRelated>(t),priority_tag<3>{}))
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }

    returnfrom_json_tuple_impl(std::forward<BasicJsonType>(j),std::forward<TupleRelated>(t),priority_tag<3>{});
    }

    template<typenameBasicJsonType,typenameKey,typenameValue,typenameCompare,typenameAllocator,
    typename=enable_if_t<!std::is_constructible<
    typenameBasicJsonType::string_t,Key>::value>>
    voidfrom_json(constBasicJsonType&j,std::map<Key,Value,Compare,Allocator>&m)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }
    m.clear();
    for(constauto&p:j)
    {
    if(JSON_HEDLEY_UNLIKELY(!p.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(p.type_name()),j));
    }
    m.emplace(p.at(0).templateget<Key>(),p.at(1).templateget<Value>());
    }
    }

    template<typenameBasicJsonType,typenameKey,typenameValue,typenameHash,typenameKeyEqual,typenameAllocator,
    typename=enable_if_t<!std::is_constructible<
    typenameBasicJsonType::string_t,Key>::value>>
    voidfrom_json(constBasicJsonType&j,std::unordered_map<Key,Value,Hash,KeyEqual,Allocator>&m)
    {
    if(JSON_HEDLEY_UNLIKELY(!j.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(j.type_name()),j));
    }
    m.clear();
    for(constauto&p:j)
    {
    if(JSON_HEDLEY_UNLIKELY(!p.is_array()))
    {
    JSON_THROW(type_error::create(302,"typemustbearray,butis"+std::string(p.type_name()),j));
    }
    m.emplace(p.at(0).templateget<Key>(),p.at(1).templateget<Value>());
    }
    }

    structfrom_json_fn
    {
    template<typenameBasicJsonType,typenameT>
    autooperator()(constBasicJsonType&j,T&&val)const
    noexcept(noexcept(from_json(j,std::forward<T>(val))))
    ->decltype(from_json(j,std::forward<T>(val)))
    {
    returnfrom_json(j,std::forward<T>(val));
    }
    };
    }//namespacedetail

    namespace//NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)
    {
    constexprconstauto&from_json=detail::static_const<detail::from_json_fn>::value;//NOLINT(misc-definitions-in-headers)
    }//namespace
    }//namespacenlohmann

    //#include<nlohmann/detail/conversions/to_json.hpp>

    #include<algorithm>//copy
    #include<iterator>//begin,end
    #include<string>//string
    #include<tuple>//tuple,get
    #include<type_traits>//is_same,is_constructible,is_floating_point,is_enum,underlying_type
    #include<utility>//move,forward,declval,pair
    #include<valarray>//valarray
    #include<vector>//vector

    //#include<nlohmann/detail/iterators/iteration_proxy.hpp>

    #include<cstddef>//size_t
    #include<iterator>//input_iterator_tag
    #include<string>//string,to_string
    #include<tuple>//tuple_size,get,tuple_element
    #include<utility>//move

    //#include<nlohmann/detail/meta/type_traits.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenamestring_type>
    voidint_to_string(string_type&target,std::size_tvalue)
    {
    //ForADL
    usingstd::to_string;
    target=to_string(value);
    }
    template<typenameIteratorType>classiteration_proxy_value
    {
    public:
    usingdifference_type=std::ptrdiff_t;
    usingvalue_type=iteration_proxy_value;
    usingpointer=value_type*;
    usingreference=value_type&;
    usingiterator_category=std::input_iterator_tag;
    usingstring_type=typenamestd::remove_cv<typenamestd::remove_reference<decltype(std::declval<IteratorType>().key())>::type>::type;

    private:
    IteratorTypeanchor;
    std::size_tarray_index=0;
    mutablestd::size_tarray_index_last=0;
    mutablestring_typearray_index_str="0";
    conststring_typeempty_str{};

    public:
    explicititeration_proxy_value(IteratorTypeit)noexcept
    :anchor(std::move(it))
    {}

    iteration_proxy_value&operator*()
    {
    return*this;
    }

    iteration_proxy_value&operator++()
    {
    ++anchor;
    ++array_index;

    return*this;
    }

    booloperator==(constiteration_proxy_value&o)const
    {
    returnanchor==o.anchor;
    }

    booloperator!=(constiteration_proxy_value&o)const
    {
    returnanchor!=o.anchor;
    }

    conststring_type&key()const
    {
    JSON_ASSERT(anchor.m_object!=nullptr);

    switch(anchor.m_object->type())
    {
    //useintegerarrayindexaskey
    casevalue_t::array:
    {
    if(array_index!=array_index_last)
    {
    int_to_string(array_index_str,array_index);
    array_index_last=array_index;
    }
    returnarray_index_str;
    }

    //usekeyfromtheobject
    casevalue_t::object:
    returnanchor.key();

    //useanemptykeyforallprimitivetypes
    default:
    returnempty_str;
    }
    }

    typenameIteratorType::referencevalue()const
    {
    returnanchor.value();
    }
    };

    template<typenameIteratorType>classiteration_proxy
    {
    private:
    typenameIteratorType::referencecontainer;

    public:
    explicititeration_proxy(typenameIteratorType::referencecont)noexcept
    :container(cont){}

    iteration_proxy_value<IteratorType>begin()noexcept
    {
    returniteration_proxy_value<IteratorType>(container.begin());
    }

    iteration_proxy_value<IteratorType>end()noexcept
    {
    returniteration_proxy_value<IteratorType>(container.end());
    }
    };
    //StructuredBindingsSupport
    //Forfurtherreferenceseehttps://blog.tartanllama.xyz/structured-bindings/
    //Andseehttps://github.com/nlohmann/json/pull/1391
    template<std::size_tN,typenameIteratorType,enable_if_t<N==0,int>=0>
    autoget(constnlohmann::detail::iteration_proxy_value<IteratorType>&i)->decltype(i.key())
    {
    returni.key();
    }
    //StructuredBindingsSupport
    //Forfurtherreferenceseehttps://blog.tartanllama.xyz/structured-bindings/
    //Andseehttps://github.com/nlohmann/json/pull/1391
    template<std::size_tN,typenameIteratorType,enable_if_t<N==1,int>=0>
    autoget(constnlohmann::detail::iteration_proxy_value<IteratorType>&i)->decltype(i.value())
    {
    returni.value();
    }
    }//namespacedetail
    }//namespacenlohmann

    //TheAdditiontotheSTDNamespaceisrequiredtoadd
    //StructuredBindingsSupporttotheiteration_proxy_valueclass
    //Forfurtherreferenceseehttps://blog.tartanllama.xyz/structured-bindings/
    //Andseehttps://github.com/nlohmann/json/pull/1391
    namespacestd
    {
    #ifdefined(__clang__)
    //Fix:https://github.com/nlohmann/json/issues/1401
    #pragmaclangdiagnosticpush
    #pragmaclangdiagnosticignored"-Wmismatched-tags"
    #endif
    template<typenameIteratorType>
    classtuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
    :publicstd::integral_constant<std::size_t,2>{};

    template<std::size_tN,typenameIteratorType>
    classtuple_element<N,::nlohmann::detail::iteration_proxy_value<IteratorType>>
    {
    public:
    usingtype=decltype(
    get<N>(std::declval<
    ::nlohmann::detail::iteration_proxy_value<IteratorType >>()));
    };
    #ifdefined(__clang__)
    #pragmaclangdiagnosticpop
    #endif
    }//namespacestd

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //constructors//

    template<value_t>structexternal_constructor;

    template<>
    structexternal_constructor<value_t::boolean>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::boolean_tb)noexcept
    {
    j.m_type=value_t::boolean;
    j.m_value=b;
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::string>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,consttypenameBasicJsonType::string_t&s)
    {
    j.m_type=value_t::string;
    j.m_value=s;
    j.assert_invariant();
    }

    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::string_t&&s)
    {
    j.m_type=value_t::string;
    j.m_value=std::move(s);
    j.assert_invariant();
    }

    template<typenameBasicJsonType,typenameCompatibleStringType,
    enable_if_t < !std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value,
    int>=0>
    staticvoidconstruct(BasicJsonType&j,constCompatibleStringType&str)
    {
    j.m_type=value_t::string;
    j.m_value.string=j.templatecreate<typenameBasicJsonType::string_t>(str);
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::binary>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,consttypenameBasicJsonType::binary_t&b)
    {
    j.m_type=value_t::binary;
    j.m_value=typenameBasicJsonType::binary_t(b);
    j.assert_invariant();
    }

    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::binary_t&&b)
    {
    j.m_type=value_t::binary;
    j.m_value=typenameBasicJsonType::binary_t(std::move(b));;
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::number_float>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::number_float_tval)noexcept
    {
    j.m_type=value_t::number_float;
    j.m_value=val;
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::number_unsigned>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::number_unsigned_tval)noexcept
    {
    j.m_type=value_t::number_unsigned;
    j.m_value=val;
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::number_integer>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::number_integer_tval)noexcept
    {
    j.m_type=value_t::number_integer;
    j.m_value=val;
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::array>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,consttypenameBasicJsonType::array_t&arr)
    {
    j.m_type=value_t::array;
    j.m_value=arr;
    j.set_parents();
    j.assert_invariant();
    }

    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::array_t&&arr)
    {
    j.m_type=value_t::array;
    j.m_value=std::move(arr);
    j.set_parents();
    j.assert_invariant();
    }

    template<typenameBasicJsonType,typenameCompatibleArrayType,
    enable_if_t < !std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value,
    int>=0>
    staticvoidconstruct(BasicJsonType&j,constCompatibleArrayType&arr)
    {
    usingstd::begin;
    usingstd::end;
    j.m_type=value_t::array;
    j.m_value.array=j.templatecreate<typenameBasicJsonType::array_t>(begin(arr),end(arr));
    j.set_parents();
    j.assert_invariant();
    }

    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,conststd::vector<bool>&arr)
    {
    j.m_type=value_t::array;
    j.m_value=value_t::array;
    j.m_value.array->reserve(arr.size());
    for(constboolx:arr)
    {
    j.m_value.array->push_back(x);
    j.set_parent(j.m_value.array->back());
    }
    j.assert_invariant();
    }

    template<typenameBasicJsonType,typenameT,
    enable_if_t<std::is_convertible<T, BasicJsonType>::value,int>=0>
    staticvoidconstruct(BasicJsonType&j,conststd::valarray<T>&arr)
    {
    j.m_type=value_t::array;
    j.m_value=value_t::array;
    j.m_value.array->resize(arr.size());
    if(arr.size()>0)
    {
    std::copy(std::begin(arr),std::end(arr),j.m_value.array->begin());
    }
    j.set_parents();
    j.assert_invariant();
    }
    };

    template<>
    structexternal_constructor<value_t::object>
    {
    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,consttypenameBasicJsonType::object_t&obj)
    {
    j.m_type=value_t::object;
    j.m_value=obj;
    j.set_parents();
    j.assert_invariant();
    }

    template<typenameBasicJsonType>
    staticvoidconstruct(BasicJsonType&j,typenameBasicJsonType::object_t&&obj)
    {
    j.m_type=value_t::object;
    j.m_value=std::move(obj);
    j.set_parents();
    j.assert_invariant();
    }

    template<typenameBasicJsonType,typenameCompatibleObjectType,
    enable_if_t < !std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value,int>=0>
    staticvoidconstruct(BasicJsonType&j,constCompatibleObjectType&obj)
    {
    usingstd::begin;
    usingstd::end;

    j.m_type=value_t::object;
    j.m_value.object=j.templatecreate<typenameBasicJsonType::object_t>(begin(obj),end(obj));
    j.set_parents();
    j.assert_invariant();
    }
    };

    //to_json//

    template<typenameBasicJsonType,typenameT,
    enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value,int>=0>
    voidto_json(BasicJsonType&j,Tb)noexcept
    {
    external_constructor<value_t::boolean>::construct(j,b);
    }

    template<typenameBasicJsonType,typenameCompatibleString,
    enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value,int>=0>
    voidto_json(BasicJsonType&j,constCompatibleString&s)
    {
    external_constructor<value_t::string>::construct(j,s);
    }

    template<typenameBasicJsonType>
    voidto_json(BasicJsonType&j,typenameBasicJsonType::string_t&&s)
    {
    external_constructor<value_t::string>::construct(j,std::move(s));
    }

    template<typenameBasicJsonType,typenameFloatType,
    enable_if_t<std::is_floating_point<FloatType>::value,int>=0>
    voidto_json(BasicJsonType&j,FloatTypeval)noexcept
    {
    external_constructor<value_t::number_float>::construct(j,static_cast<typenameBasicJsonType::number_float_t>(val));
    }

    template<typenameBasicJsonType,typenameCompatibleNumberUnsignedType,
    enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value,int>=0>
    voidto_json(BasicJsonType&j,CompatibleNumberUnsignedTypeval)noexcept
    {
    external_constructor<value_t::number_unsigned>::construct(j,static_cast<typenameBasicJsonType::number_unsigned_t>(val));
    }

    template<typenameBasicJsonType,typenameCompatibleNumberIntegerType,
    enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value,int>=0>
    voidto_json(BasicJsonType&j,CompatibleNumberIntegerTypeval)noexcept
    {
    external_constructor<value_t::number_integer>::construct(j,static_cast<typenameBasicJsonType::number_integer_t>(val));
    }

    template<typenameBasicJsonType,typenameEnumType,
    enable_if_t<std::is_enum<EnumType>::value,int>=0>
    voidto_json(BasicJsonType&j,EnumTypee)noexcept
    {
    usingunderlying_type=typenamestd::underlying_type<EnumType>::type;
    external_constructor<value_t::number_integer>::construct(j,static_cast<underlying_type>(e));
    }

    template<typenameBasicJsonType>
    voidto_json(BasicJsonType&j,conststd::vector<bool>&e)
    {
    external_constructor<value_t::array>::construct(j,e);
    }

    template<typenameBasicJsonType,typenameCompatibleArrayType,
    enable_if_t<is_compatible_array_type<BasicJsonType,
    CompatibleArrayType>::value&&
    !is_compatible_object_type<BasicJsonType, CompatibleArrayType>::value&&
    !is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value&&
    !std::is_same<typenameBasicJsonType::binary_t,CompatibleArrayType>::value&&
    !is_basic_json<CompatibleArrayType>::value,
    int>=0>
    voidto_json(BasicJsonType&j,constCompatibleArrayType&arr)
    {
    external_constructor<value_t::array>::construct(j,arr);
    }

    template<typenameBasicJsonType>
    voidto_json(BasicJsonType&j,consttypenameBasicJsonType::binary_t&bin)
    {
    external_constructor<value_t::binary>::construct(j,bin);
    }

    template<typenameBasicJsonType,typenameT,
    enable_if_t<std::is_convertible<T, BasicJsonType>::value,int>=0>
    voidto_json(BasicJsonType&j,conststd::valarray<T>&arr)
    {
    external_constructor<value_t::array>::construct(j,std::move(arr));
    }

    template<typenameBasicJsonType>
    voidto_json(BasicJsonType&j,typenameBasicJsonType::array_t&&arr)
    {
    external_constructor<value_t::array>::construct(j,std::move(arr));
    }

    template<typenameBasicJsonType,typenameCompatibleObjectType,
    enable_if_t < is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value&&!is_basic_json<CompatibleObjectType>::value,int>=0>
    voidto_json(BasicJsonType&j,constCompatibleObjectType&obj)
    {
    external_constructor<value_t::object>::construct(j,obj);
    }

    template<typenameBasicJsonType>
    voidto_json(BasicJsonType&j,typenameBasicJsonType::object_t&&obj)
    {
    external_constructor<value_t::object>::construct(j,std::move(obj));
    }

    template<
    typenameBasicJsonType,typenameT,std::size_tN,
    enable_if_t<!std::is_constructible<typenameBasicJsonType::string_t,
    constT(&)[N]>::value,//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    int>=0>
    voidto_json(BasicJsonType&j,constT(&arr)[N])//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    {
    external_constructor<value_t::array>::construct(j,arr);
    }

    template<typenameBasicJsonType,typenameT1,typenameT2,enable_if_t<std::is_constructible<BasicJsonType,T1>::value&&std::is_constructible<BasicJsonType,T2>::value,int>=0>
    voidto_json(BasicJsonType&j,conststd::pair<T1,T2>&p)
    {
    j={p.first,p.second};
    }

    //forhttps://github.com/nlohmann/json/pull/1134
    template<typenameBasicJsonType,typenameT,
    enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value,int>=0>
    voidto_json(BasicJsonType&j,constT&b)
    {
    j={{b.key(),b.value()}};
    }

    template<typenameBasicJsonType,typenameTuple,std::size_t...Idx>
    voidto_json_tuple_impl(BasicJsonType&j,constTuple&t,index_sequence<Idx...>/*unused*/)
    {
    j={std::get<Idx>(t)...};
    }

    template<typename BasicJsonType, typename T, enable_if_t<is_constructible_tuple<BasicJsonType, T>::value,int>=0>
    voidto_json(BasicJsonType&j,constT&t)
    {
    to_json_tuple_impl(j,t,make_index_sequence<std::tuple_size<T>::value>{});
    }

    structto_json_fn
    {
    template<typenameBasicJsonType,typenameT>
    autooperator()(BasicJsonType&j,T&&val)constnoexcept(noexcept(to_json(j,std::forward<T>(val))))
    ->decltype(to_json(j,std::forward<T>(val)),void())
    {
    returnto_json(j,std::forward<T>(val));
    }
    };
    }//namespacedetail

    namespace//NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces)
    {
    constexprconstauto&to_json=detail::static_const<detail::to_json_fn>::value;//NOLINT(misc-definitions-in-headers)
    }//namespace
    }//namespacenlohmann

    //#include<nlohmann/detail/meta/identity_tag.hpp>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    namespacenlohmann
    {

    template<typenameValueType,typename>
    structadl_serializer
    {
    template<typenameBasicJsonType,typenameTargetType=ValueType>
    staticautofrom_json(BasicJsonType&&j,TargetType&val)noexcept(
    noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j),val)))
    ->decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j),val),void())
    {
    ::nlohmann::from_json(std::forward<BasicJsonType>(j),val);
    }

    template<typenameBasicJsonType,typenameTargetType=ValueType>
    staticautofrom_json(BasicJsonType&&j)noexcept(
    noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j),detail::identity_tag<TargetType>{})))
    ->decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j),detail::identity_tag<TargetType>{}))
    {
    return ::nlohmann::from_json(std::forward<BasicJsonType>(j),detail::identity_tag<TargetType>{});
    }

    template<typenameBasicJsonType,typenameTargetType=ValueType>
    staticautoto_json(BasicJsonType&j,TargetType&&val)noexcept(
    noexcept(::nlohmann::to_json(j,std::forward<TargetType>(val))))
    ->decltype(::nlohmann::to_json(j,std::forward<TargetType>(val)),void())
    {
    ::nlohmann::to_json(j,std::forward<TargetType>(val));
    }
    };
    }//namespacenlohmann

    //#include<nlohmann/byte_container_with_subtype.hpp>

    #include<cstdint>//uint8_t
    #include<tuple>//tie
    #include<utility>//move

    namespacenlohmann
    {

    template<typenameBinaryType>
    classbyte_container_with_subtype:publicBinaryType
    {
    public:
    usingcontainer_type=BinaryType;

    byte_container_with_subtype()noexcept(noexcept(container_type()))
    :container_type()
    {}

    byte_container_with_subtype(constcontainer_type&b)noexcept(noexcept(container_type(b)))
    :container_type(b)
    {}

    byte_container_with_subtype(container_type&&b)noexcept(noexcept(container_type(std::move(b))))
    :container_type(std::move(b))
    {}

    byte_container_with_subtype(constcontainer_type&b,std::uint8_tsubtype_)noexcept(noexcept(container_type(b)))
    :container_type(b)
    ,m_subtype(subtype_)
    ,m_has_subtype(true)
    {}

    byte_container_with_subtype(container_type&&b,std::uint8_tsubtype_)noexcept(noexcept(container_type(std::move(b))))
    :container_type(std::move(b))
    ,m_subtype(subtype_)
    ,m_has_subtype(true)
    {}

    booloperator==(constbyte_container_with_subtype&rhs)const
    {
    returnstd::tie(static_cast<constBinaryType&>(*this),m_subtype,m_has_subtype)==
    std::tie(static_cast<constBinaryType&>(rhs),rhs.m_subtype,rhs.m_has_subtype);
    }

    booloperator!=(constbyte_container_with_subtype&rhs)const
    {
    return!(rhs==*this);
    }

    voidset_subtype(std::uint8_tsubtype_)noexcept
    {
    m_subtype=subtype_;
    m_has_subtype=true;
    }

    constexprstd::uint8_tsubtype()constnoexcept
    {
    returnm_subtype;
    }

    constexprboolhas_subtype()constnoexcept
    {
    returnm_has_subtype;
    }

    voidclear_subtype()noexcept
    {
    m_subtype=0;
    m_has_subtype=false;
    }

    private:
    std::uint8_tm_subtype=0;
    boolm_has_subtype=false;
    };

    }//namespacenlohmann

    //#include<nlohmann/detail/conversions/from_json.hpp>

    //#include<nlohmann/detail/conversions/to_json.hpp>

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/hash.hpp>

    #include<cstdint>//uint8_t
    #include<cstddef>//size_t
    #include<functional>//hash

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {

    //boost::hash_combine
    inlinestd::size_tcombine(std::size_tseed,std::size_th)noexcept
    {
    seed^=h+0x9e3779b9+(seed<<6U)+(seed>>2U);
    returnseed;
    }

    template<typenameBasicJsonType>
    std::size_thash(constBasicJsonType&j)
    {
    usingstring_t=typenameBasicJsonType::string_t;
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;

    constautotype=static_cast<std::size_t>(j.type());
    switch(j.type())
    {
    caseBasicJsonType::value_t::null:
    caseBasicJsonType::value_t::discarded:
    {
    returncombine(type,0);
    }

    caseBasicJsonType::value_t::object:
    {
    autoseed=combine(type,j.size());
    for(constauto&element:j.items())
    {
    constautoh=std::hash<string_t>{}(element.key());
    seed=combine(seed,h);
    seed=combine(seed,hash(element.value()));
    }
    returnseed;
    }

    caseBasicJsonType::value_t::array:
    {
    autoseed=combine(type,j.size());
    for(constauto&element:j)
    {
    seed=combine(seed,hash(element));
    }
    returnseed;
    }

    caseBasicJsonType::value_t::string:
    {
    constautoh=std::hash<string_t>{}(j.templateget_ref<conststring_t&>());
    returncombine(type,h);
    }

    caseBasicJsonType::value_t::boolean:
    {
    constautoh=std::hash<bool>{}(j.templateget<bool>());
    returncombine(type,h);
    }

    caseBasicJsonType::value_t::number_integer:
    {
    constautoh=std::hash<number_integer_t>{}(j.templateget<number_integer_t>());
    returncombine(type,h);
    }

    caseBasicJsonType::value_t::number_unsigned:
    {
    constautoh=std::hash<number_unsigned_t>{}(j.templateget<number_unsigned_t>());
    returncombine(type,h);
    }

    caseBasicJsonType::value_t::number_float:
    {
    constautoh=std::hash<number_float_t>{}(j.templateget<number_float_t>());
    returncombine(type,h);
    }

    caseBasicJsonType::value_t::binary:
    {
    autoseed=combine(type,j.get_binary().size());
    constautoh=std::hash<bool>{}(j.get_binary().has_subtype());
    seed=combine(seed,h);
    seed=combine(seed,j.get_binary().subtype());
    for(constautobyte:j.get_binary())
    {
    seed=combine(seed,std::hash<std::uint8_t>{}(byte));
    }
    returnseed;
    }

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    return0;//LCOV_EXCL_LINE
    }
    }

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/input/binary_reader.hpp>

    #include<algorithm>//generate_n
    #include<array>//array
    #include<cmath>//ldexp
    #include<cstddef>//size_t
    #include<cstdint>//uint8_t,uint16_t,uint32_t,uint64_t
    #include<cstdio>//snprintf
    #include<cstring>//memcpy
    #include<iterator>//back_inserter
    #include<limits>//numeric_limits
    #include<string>//char_traits,string
    #include<utility>//make_pair,move
    #include<vector>//vector

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/input/input_adapters.hpp>

    #include<array>//array
    #include<cstddef>//size_t
    #include<cstdio>//FILE*
    #include<cstring>//strlen
    #include<istream>//istream
    #include<iterator>//begin,end,iterator_traits,random_access_iterator_tag,distance,next
    #include<memory>//shared_ptr,make_shared,addressof
    #include<numeric>//accumulate
    #include<string>//string,char_traits
    #include<type_traits>//enable_if,is_base_of,is_pointer,is_integral,remove_pointer
    #include<utility>//pair,declval

    //#include<nlohmann/detail/iterators/iterator_traits.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    enumclassinput_format_t{json,cbor,msgpack,ubjson,bson};

    //inputadapters//

    classfile_input_adapter
    {
    public:
    usingchar_type=char;

    JSON_HEDLEY_NON_NULL(2)
    explicitfile_input_adapter(std::FILE*f)noexcept
    :m_file(f)
    {}

    //makeclassmove-only
    file_input_adapter(constfile_input_adapter&)=delete;
    file_input_adapter(file_input_adapter&&)noexcept=default;
    file_input_adapter&operator=(constfile_input_adapter&)=delete;
    file_input_adapter&operator=(file_input_adapter&&)=delete;
    ~file_input_adapter()=default;

    std::char_traits<char>::int_typeget_character()noexcept
    {
    returnstd::fgetc(m_file);
    }

    private:
    std::FILE*m_file;
    };

    classinput_stream_adapter
    {
    public:
    usingchar_type=char;

    ~input_stream_adapter()
    {
    //clearstreamflags;weuseunderlyingstreambufI/O,donot
    //maintainifstreamflags,excepteof
    if(is!=nullptr)
    {
    is->clear(is->rdstate()&std::ios::eofbit);
    }
    }

    explicitinput_stream_adapter(std::istream&i)
    :is(&i),sb(i.rdbuf())
    {}

    //deletebecauseofpointermembers
    input_stream_adapter(constinput_stream_adapter&)=delete;
    input_stream_adapter&operator=(input_stream_adapter&)=delete;
    input_stream_adapter&operator=(input_stream_adapter&&)=delete;

    input_stream_adapter(input_stream_adapter&&rhs)noexcept
    :is(rhs.is),sb(rhs.sb)
    {
    rhs.is=nullptr;
    rhs.sb=nullptr;
    }

    //std::istream/std::streambufusestd::char_traits<char>::to_int_type,to
    //ensurethatstd::char_traits<char>::eof()andthecharacter0xFFdonot
    //endupasthesamevalue,eg.0xFFFFFFFF.
    std::char_traits<char>::int_typeget_character()
    {
    autores=sb->sbumpc();
    //seteofmanually,aswedon'tusetheistreaminterface.
    if(JSON_HEDLEY_UNLIKELY(res==EOF))
    {
    is->clear(is->rdstate()|std::ios::eofbit);
    }
    returnres;
    }

    private:
    std::istream*is=nullptr;
    std::streambuf*sb=nullptr;
    };

    //General-purposeiterator-basedadapter.Itmightnotbeasfastas
    //theoreticallypossibleforsomecontainers,butitisextremelyversatile.
    template<typenameIteratorType>
    classiterator_input_adapter
    {
    public:
    usingchar_type=typenamestd::iterator_traits<IteratorType>::value_type;

    iterator_input_adapter(IteratorTypefirst,IteratorTypelast)
    :current(std::move(first)),end(std::move(last))
    {}

    typenamestd::char_traits<char_type>::int_typeget_character()
    {
    if(JSON_HEDLEY_LIKELY(current!=end))
    {
    autoresult=std::char_traits<char_type>::to_int_type(*current);
    std::advance(current,1);
    returnresult;
    }

    returnstd::char_traits<char_type>::eof();
    }

    private:
    IteratorTypecurrent;
    IteratorTypeend;

    template<typenameBaseInputAdapter,size_tT>
    friendstructwide_string_input_helper;

    boolempty()const
    {
    returncurrent==end;
    }
    };

    template<typenameBaseInputAdapter,size_tT>
    structwide_string_input_helper;

    template<typenameBaseInputAdapter>
    structwide_string_input_helper<BaseInputAdapter,4>
    {
    //UTF-32
    staticvoidfill_buffer(BaseInputAdapter&input,
    std::array<std::char_traits<char>::int_type,4>&utf8_bytes,
    size_t&utf8_bytes_index,
    size_t&utf8_bytes_filled)
    {
    utf8_bytes_index=0;

    if(JSON_HEDLEY_UNLIKELY(input.empty()))
    {
    utf8_bytes[0]=std::char_traits<char>::eof();
    utf8_bytes_filled=1;
    }
    else
    {
    //getthecurrentcharacter
    constautowc=input.get_character();

    //UTF-32toUTF-8encoding
    if(wc<0x80)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(wc);
    utf8_bytes_filled=1;
    }
    elseif(wc<=0x7FF)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xC0u|((static_cast<unsignedint>(wc)>>6u)&0x1Fu));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|(static_cast<unsignedint>(wc)&0x3Fu));
    utf8_bytes_filled=2;
    }
    elseif(wc<=0xFFFF)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xE0u|((static_cast<unsignedint>(wc)>>12u)&0x0Fu));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|((static_cast<unsignedint>(wc)>>6u)&0x3Fu));
    utf8_bytes[2]=static_cast<std::char_traits<char>::int_type>(0x80u|(static_cast<unsignedint>(wc)&0x3Fu));
    utf8_bytes_filled=3;
    }
    elseif(wc<=0x10FFFF)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xF0u|((static_cast<unsignedint>(wc)>>18u)&0x07u));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|((static_cast<unsignedint>(wc)>>12u)&0x3Fu));
    utf8_bytes[2]=static_cast<std::char_traits<char>::int_type>(0x80u|((static_cast<unsignedint>(wc)>>6u)&0x3Fu));
    utf8_bytes[3]=static_cast<std::char_traits<char>::int_type>(0x80u|(static_cast<unsignedint>(wc)&0x3Fu));
    utf8_bytes_filled=4;
    }
    else
    {
    //unknowncharacter
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(wc);
    utf8_bytes_filled=1;
    }
    }
    }
    };

    template<typenameBaseInputAdapter>
    structwide_string_input_helper<BaseInputAdapter,2>
    {
    //UTF-16
    staticvoidfill_buffer(BaseInputAdapter&input,
    std::array<std::char_traits<char>::int_type,4>&utf8_bytes,
    size_t&utf8_bytes_index,
    size_t&utf8_bytes_filled)
    {
    utf8_bytes_index=0;

    if(JSON_HEDLEY_UNLIKELY(input.empty()))
    {
    utf8_bytes[0]=std::char_traits<char>::eof();
    utf8_bytes_filled=1;
    }
    else
    {
    //getthecurrentcharacter
    constautowc=input.get_character();

    //UTF-16toUTF-8encoding
    if(wc<0x80)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(wc);
    utf8_bytes_filled=1;
    }
    elseif(wc<=0x7FF)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xC0u|((static_cast<unsignedint>(wc)>>6u)));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|(static_cast<unsignedint>(wc)&0x3Fu));
    utf8_bytes_filled=2;
    }
    elseif(0xD800>wc||wc>=0xE000)
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xE0u|((static_cast<unsignedint>(wc)>>12u)));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|((static_cast<unsignedint>(wc)>>6u)&0x3Fu));
    utf8_bytes[2]=static_cast<std::char_traits<char>::int_type>(0x80u|(static_cast<unsignedint>(wc)&0x3Fu));
    utf8_bytes_filled=3;
    }
    else
    {
    if(JSON_HEDLEY_UNLIKELY(!input.empty()))
    {
    constautowc2=static_cast<unsignedint>(input.get_character());
    constautocharcode=0x10000u+(((static_cast<unsignedint>(wc)&0x3FFu)<<10u)|(wc2&0x3FFu));
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(0xF0u|(charcode>>18u));
    utf8_bytes[1]=static_cast<std::char_traits<char>::int_type>(0x80u|((charcode>>12u)&0x3Fu));
    utf8_bytes[2]=static_cast<std::char_traits<char>::int_type>(0x80u|((charcode>>6u)&0x3Fu));
    utf8_bytes[3]=static_cast<std::char_traits<char>::int_type>(0x80u|(charcode&0x3Fu));
    utf8_bytes_filled=4;
    }
    else
    {
    utf8_bytes[0]=static_cast<std::char_traits<char>::int_type>(wc);
    utf8_bytes_filled=1;
    }
    }
    }
    }
    };

    //Wrapsanotherinputapdatertoconvertwidecharactertypesintoindividualbytes.
    template<typenameBaseInputAdapter,typenameWideCharType>
    classwide_string_input_adapter
    {
    public:
    usingchar_type=char;

    wide_string_input_adapter(BaseInputAdapterbase)
    :base_adapter(base){}

    typenamestd::char_traits<char>::int_typeget_character()noexcept
    {
    //checkifbufferneedstobefilled
    if(utf8_bytes_index==utf8_bytes_filled)
    {
    fill_buffer<sizeof(WideCharType)>();

    JSON_ASSERT(utf8_bytes_filled>0);
    JSON_ASSERT(utf8_bytes_index==0);
    }

    //usebuffer
    JSON_ASSERT(utf8_bytes_filled>0);
    JSON_ASSERT(utf8_bytes_index<utf8_bytes_filled);
    returnutf8_bytes[utf8_bytes_index++];
    }

    private:
    BaseInputAdapterbase_adapter;

    template<size_tT>
    voidfill_buffer()
    {
    wide_string_input_helper<BaseInputAdapter, T>::fill_buffer(base_adapter,utf8_bytes,utf8_bytes_index,utf8_bytes_filled);
    }

    std::array<std::char_traits<char>::int_type,4>utf8_bytes={{0,0,0,0}};

    std::size_tutf8_bytes_index=0;
    std::size_tutf8_bytes_filled=0;
    };

    template<typenameIteratorType,typenameEnable=void>
    structiterator_input_adapter_factory
    {
    usingiterator_type=IteratorType;
    usingchar_type=typenamestd::iterator_traits<iterator_type>::value_type;
    usingadapter_type=iterator_input_adapter<iterator_type>;

    staticadapter_typecreate(IteratorTypefirst,IteratorTypelast)
    {
    returnadapter_type(std::move(first),std::move(last));
    }
    };

    template<typenameT>
    structis_iterator_of_multibyte
    {
    usingvalue_type=typenamestd::iterator_traits<T>::value_type;
    enum
    {
    value=sizeof(value_type)>1
    };
    };

    template<typenameIteratorType>
    structiterator_input_adapter_factory<IteratorType,enable_if_t<is_iterator_of_multibyte<IteratorType>::value>>
    {
    usingiterator_type=IteratorType;
    usingchar_type=typenamestd::iterator_traits<iterator_type>::value_type;
    usingbase_adapter_type=iterator_input_adapter<iterator_type>;
    usingadapter_type=wide_string_input_adapter<base_adapter_type, char_type>;

    staticadapter_typecreate(IteratorTypefirst,IteratorTypelast)
    {
    returnadapter_type(base_adapter_type(std::move(first),std::move(last)));
    }
    };

    //Generalpurposeiterator-basedinput
    template<typenameIteratorType>
    typenameiterator_input_adapter_factory<IteratorType>::adapter_typeinput_adapter(IteratorTypefirst,IteratorTypelast)
    {
    usingfactory_type=iterator_input_adapter_factory<IteratorType>;
    returnfactory_type::create(first,last);
    }

    //Convenienceshorthandfromcontainertoiterator
    //EnablesADLonbegin(container)andend(container)
    //Enclosestheusingdeclarationsinnamespacefornottoleakthemtooutsidescope

    namespacecontainer_input_adapter_factory_impl
    {

    usingstd::begin;
    usingstd::end;

    template<typenameContainerType,typenameEnable=void>
    structcontainer_input_adapter_factory{};

    template<typenameContainerType>
    structcontainer_input_adapter_factory<ContainerType,
    void_t<decltype(begin(std::declval<ContainerType>()),end(std::declval<ContainerType>()))>>
    {
    usingadapter_type=decltype(input_adapter(begin(std::declval<ContainerType>()),end(std::declval<ContainerType>())));

    staticadapter_typecreate(constContainerType&container)
    {
    returninput_adapter(begin(container),end(container));
    }
    };

    }//namespacecontainer_input_adapter_factory_impl

    template<typenameContainerType>
    typenamecontainer_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_typeinput_adapter(constContainerType&container)
    {
    returncontainer_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::create(container);
    }

    //Specialcaseswithfastpaths
    inlinefile_input_adapterinput_adapter(std::FILE*file)
    {
    returnfile_input_adapter(file);
    }

    inlineinput_stream_adapterinput_adapter(std::istream&stream)
    {
    returninput_stream_adapter(stream);
    }

    inlineinput_stream_adapterinput_adapter(std::istream&&stream)
    {
    returninput_stream_adapter(stream);
    }

    usingcontiguous_bytes_input_adapter=decltype(input_adapter(std::declval<constchar*>(),std::declval<constchar*>()));

    //Null-delimitedstrings,andthelike.
    template<typenameCharT,
    typenamestd::enable_if<
    std::is_pointer<CharT>::value&&
    !std::is_array<CharT>::value&&
    std::is_integral<typenamestd::remove_pointer<CharT>::type>::value&&
    sizeof(typenamestd::remove_pointer<CharT>::type)==1,
    int>::type=0>
    contiguous_bytes_input_adapterinput_adapter(CharTb)
    {
    autolength=std::strlen(reinterpret_cast<constchar*>(b));
    constauto*ptr=reinterpret_cast<constchar*>(b);
    returninput_adapter(ptr,ptr+length);
    }

    template<typenameT,std::size_tN>
    autoinput_adapter(T(&array)[N])->decltype(input_adapter(array,array+N))//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    {
    returninput_adapter(array,array+N);
    }

    //Thisclassonlyhandlesinputsofinput_buffer_adaptertype.
    //It'srequiredsothatexpressionslike{ptr,len}canbeimplicitelycasted
    //tothecorrectadapter.
    classspan_input_adapter
    {
    public:
    template<typenameCharT,
    typenamestd::enable_if<
    std::is_pointer<CharT>::value&&
    std::is_integral<typenamestd::remove_pointer<CharT>::type>::value&&
    sizeof(typenamestd::remove_pointer<CharT>::type)==1,
    int>::type=0>
    span_input_adapter(CharTb,std::size_tl)
    :ia(reinterpret_cast<constchar*>(b),reinterpret_cast<constchar*>(b)+l){}

    template<classIteratorType,
    typenamestd::enable_if<
    std::is_same<typenameiterator_traits<IteratorType>::iterator_category,std::random_access_iterator_tag>::value,
    int>::type=0>
    span_input_adapter(IteratorTypefirst,IteratorTypelast)
    :ia(input_adapter(first,last)){}

    contiguous_bytes_input_adapter&&get()
    {
    returnstd::move(ia);//NOLINT(hicpp-move-const-arg,performance-move-const-arg)
    }

    private:
    contiguous_bytes_input_adapteria;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/input/json_sax.hpp>

    #include<cstddef>
    #include<string>//string
    #include<utility>//move
    #include<vector>//vector

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {

    template<typenameBasicJsonType>
    structjson_sax
    {
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;

    virtualboolnull()=0;

    virtualboolboolean(boolval)=0;

    virtualboolnumber_integer(number_integer_tval)=0;

    virtualboolnumber_unsigned(number_unsigned_tval)=0;

    virtualboolnumber_float(number_float_tval,conststring_t&s)=0;

    virtualboolstring(string_t&val)=0;

    virtualboolbinary(binary_t&val)=0;

    virtualboolstart_object(std::size_telements)=0;

    virtualboolkey(string_t&val)=0;

    virtualboolend_object()=0;

    virtualboolstart_array(std::size_telements)=0;

    virtualboolend_array()=0;

    virtualboolparse_error(std::size_tposition,
    conststd::string&last_token,
    constdetail::exception&ex)=0;

    json_sax()=default;
    json_sax(constjson_sax&)=default;
    json_sax(json_sax&&)noexcept=default;
    json_sax&operator=(constjson_sax&)=default;
    json_sax&operator=(json_sax&&)noexcept=default;
    virtual~json_sax()=default;
    };

    namespacedetail
    {
    template<typenameBasicJsonType>
    classjson_sax_dom_parser
    {
    public:
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;

    explicitjson_sax_dom_parser(BasicJsonType&r,constboolallow_exceptions_=true)
    :root(r),allow_exceptions(allow_exceptions_)
    {}

    //makeclassmove-only
    json_sax_dom_parser(constjson_sax_dom_parser&)=delete;
    json_sax_dom_parser(json_sax_dom_parser&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    json_sax_dom_parser&operator=(constjson_sax_dom_parser&)=delete;
    json_sax_dom_parser&operator=(json_sax_dom_parser&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    ~json_sax_dom_parser()=default;

    boolnull()
    {
    handle_value(nullptr);
    returntrue;
    }

    boolboolean(boolval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_integer(number_integer_tval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_unsigned(number_unsigned_tval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_float(number_float_tval,conststring_t&/*unused*/)
    {
    handle_value(val);
    returntrue;
    }

    boolstring(string_t&val)
    {
    handle_value(val);
    returntrue;
    }

    boolbinary(binary_t&val)
    {
    handle_value(std::move(val));
    returntrue;
    }

    boolstart_object(std::size_tlen)
    {
    ref_stack.push_back(handle_value(BasicJsonType::value_t::object));

    if(JSON_HEDLEY_UNLIKELY(len!=std::size_t(-1)&&len>ref_stack.back()->max_size()))
    {
    JSON_THROW(out_of_range::create(408,"excessiveobjectsize:"+std::to_string(len),*ref_stack.back()));
    }

    returntrue;
    }

    boolkey(string_t&val)
    {
    //addnullatgivenkeyandstorethereferenceforlater
    object_element=&(ref_stack.back()->m_value.object->operator[](val));
    returntrue;
    }

    boolend_object()
    {
    ref_stack.back()->set_parents();
    ref_stack.pop_back();
    returntrue;
    }

    boolstart_array(std::size_tlen)
    {
    ref_stack.push_back(handle_value(BasicJsonType::value_t::array));

    if(JSON_HEDLEY_UNLIKELY(len!=std::size_t(-1)&&len>ref_stack.back()->max_size()))
    {
    JSON_THROW(out_of_range::create(408,"excessivearraysize:"+std::to_string(len),*ref_stack.back()));
    }

    returntrue;
    }

    boolend_array()
    {
    ref_stack.back()->set_parents();
    ref_stack.pop_back();
    returntrue;
    }

    template<classException>
    boolparse_error(std::size_t/*unused*/,conststd::string&/*unused*/,
    constException&ex)
    {
    errored=true;
    static_cast<void>(ex);
    if(allow_exceptions)
    {
    JSON_THROW(ex);
    }
    returnfalse;
    }

    constexprboolis_errored()const
    {
    returnerrored;
    }

    private:
    template<typenameValue>
    JSON_HEDLEY_RETURNS_NON_NULL
    BasicJsonType*handle_value(Value&&v)
    {
    if(ref_stack.empty())
    {
    root=BasicJsonType(std::forward<Value>(v));
    return&root;
    }

    JSON_ASSERT(ref_stack.back()->is_array()||ref_stack.back()->is_object());

    if(ref_stack.back()->is_array())
    {
    ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
    return&(ref_stack.back()->m_value.array->back());
    }

    JSON_ASSERT(ref_stack.back()->is_object());
    JSON_ASSERT(object_element);
    *object_element=BasicJsonType(std::forward<Value>(v));
    returnobject_element;
    }

    BasicJsonType&root;
    std::vector<BasicJsonType*>ref_stack{};
    BasicJsonType*object_element=nullptr;
    boolerrored=false;
    constboolallow_exceptions=true;
    };

    template<typenameBasicJsonType>
    classjson_sax_dom_callback_parser
    {
    public:
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;
    usingparser_callback_t=typenameBasicJsonType::parser_callback_t;
    usingparse_event_t=typenameBasicJsonType::parse_event_t;

    json_sax_dom_callback_parser(BasicJsonType&r,
    constparser_callback_tcb,
    constboolallow_exceptions_=true)
    :root(r),callback(cb),allow_exceptions(allow_exceptions_)
    {
    keep_stack.push_back(true);
    }

    //makeclassmove-only
    json_sax_dom_callback_parser(constjson_sax_dom_callback_parser&)=delete;
    json_sax_dom_callback_parser(json_sax_dom_callback_parser&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    json_sax_dom_callback_parser&operator=(constjson_sax_dom_callback_parser&)=delete;
    json_sax_dom_callback_parser&operator=(json_sax_dom_callback_parser&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    ~json_sax_dom_callback_parser()=default;

    boolnull()
    {
    handle_value(nullptr);
    returntrue;
    }

    boolboolean(boolval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_integer(number_integer_tval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_unsigned(number_unsigned_tval)
    {
    handle_value(val);
    returntrue;
    }

    boolnumber_float(number_float_tval,conststring_t&/*unused*/)
    {
    handle_value(val);
    returntrue;
    }

    boolstring(string_t&val)
    {
    handle_value(val);
    returntrue;
    }

    boolbinary(binary_t&val)
    {
    handle_value(std::move(val));
    returntrue;
    }

    boolstart_object(std::size_tlen)
    {
    //checkcallbackforobjectstart
    constboolkeep=callback(static_cast<int>(ref_stack.size()),parse_event_t::object_start,discarded);
    keep_stack.push_back(keep);

    autoval=handle_value(BasicJsonType::value_t::object,true);
    ref_stack.push_back(val.second);

    //checkobjectlimit
    if(ref_stack.back()&&JSON_HEDLEY_UNLIKELY(len!=std::size_t(-1)&&len>ref_stack.back()->max_size()))
    {
    JSON_THROW(out_of_range::create(408,"excessiveobjectsize:"+std::to_string(len),*ref_stack.back()));
    }

    returntrue;
    }

    boolkey(string_t&val)
    {
    BasicJsonTypek=BasicJsonType(val);

    //checkcallbackforkey
    constboolkeep=callback(static_cast<int>(ref_stack.size()),parse_event_t::key,k);
    key_keep_stack.push_back(keep);

    //adddiscardedvalueatgivenkeyandstorethereferenceforlater
    if(keep&&ref_stack.back())
    {
    object_element=&(ref_stack.back()->m_value.object->operator[](val)=discarded);
    }

    returntrue;
    }

    boolend_object()
    {
    if(ref_stack.back())
    {
    if(!callback(static_cast<int>(ref_stack.size())-1,parse_event_t::object_end,*ref_stack.back()))
    {
    //discardobject
    *ref_stack.back()=discarded;
    }
    else
    {
    ref_stack.back()->set_parents();
    }
    }

    JSON_ASSERT(!ref_stack.empty());
    JSON_ASSERT(!keep_stack.empty());
    ref_stack.pop_back();
    keep_stack.pop_back();

    if(!ref_stack.empty()&&ref_stack.back()&&ref_stack.back()->is_structured())
    {
    //removediscardedvalue
    for(autoit=ref_stack.back()->begin();it!=ref_stack.back()->end();++it)
    {
    if(it->is_discarded())
    {
    ref_stack.back()->erase(it);
    break;
    }
    }
    }

    returntrue;
    }

    boolstart_array(std::size_tlen)
    {
    constboolkeep=callback(static_cast<int>(ref_stack.size()),parse_event_t::array_start,discarded);
    keep_stack.push_back(keep);

    autoval=handle_value(BasicJsonType::value_t::array,true);
    ref_stack.push_back(val.second);

    //checkarraylimit
    if(ref_stack.back()&&JSON_HEDLEY_UNLIKELY(len!=std::size_t(-1)&&len>ref_stack.back()->max_size()))
    {
    JSON_THROW(out_of_range::create(408,"excessivearraysize:"+std::to_string(len),*ref_stack.back()));
    }

    returntrue;
    }

    boolend_array()
    {
    boolkeep=true;

    if(ref_stack.back())
    {
    keep=callback(static_cast<int>(ref_stack.size())-1,parse_event_t::array_end,*ref_stack.back());
    if(keep)
    {
    ref_stack.back()->set_parents();
    }
    else
    {
    //discardarray
    *ref_stack.back()=discarded;
    }
    }

    JSON_ASSERT(!ref_stack.empty());
    JSON_ASSERT(!keep_stack.empty());
    ref_stack.pop_back();
    keep_stack.pop_back();

    //removediscardedvalue
    if(!keep&&!ref_stack.empty()&&ref_stack.back()->is_array())
    {
    ref_stack.back()->m_value.array->pop_back();
    }

    returntrue;
    }

    template<classException>
    boolparse_error(std::size_t/*unused*/,conststd::string&/*unused*/,
    constException&ex)
    {
    errored=true;
    static_cast<void>(ex);
    if(allow_exceptions)
    {
    JSON_THROW(ex);
    }
    returnfalse;
    }

    constexprboolis_errored()const
    {
    returnerrored;
    }

    private:
    template<typenameValue>
    std::pair<bool,BasicJsonType*>handle_value(Value&&v,constboolskip_callback=false)
    {
    JSON_ASSERT(!keep_stack.empty());

    //donothandlethisvalueifweknowitwouldbeaddedtoadiscarded
    //container
    if(!keep_stack.back())
    {
    return{false,nullptr};
    }

    //createvalue
    autovalue=BasicJsonType(std::forward<Value>(v));

    //checkcallback
    constboolkeep=skip_callback||callback(static_cast<int>(ref_stack.size()),parse_event_t::value,value);

    //donothandlethisvalueifwejustlearntitshallbediscarded
    if(!keep)
    {
    return{false,nullptr};
    }

    if(ref_stack.empty())
    {
    root=std::move(value);
    return{true,&root};
    }

    //skipthisvalueifwealreadydecidedtoskiptheparent
    //(https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
    if(!ref_stack.back())
    {
    return{false,nullptr};
    }

    //wenowonlyexpectarraysandobjects
    JSON_ASSERT(ref_stack.back()->is_array()||ref_stack.back()->is_object());

    //array
    if(ref_stack.back()->is_array())
    {
    ref_stack.back()->m_value.array->emplace_back(std::move(value));
    return{true,&(ref_stack.back()->m_value.array->back())};
    }

    //object
    JSON_ASSERT(ref_stack.back()->is_object());
    //checkifweshouldstoreanelementforthecurrentkey
    JSON_ASSERT(!key_keep_stack.empty());
    constboolstore_element=key_keep_stack.back();
    key_keep_stack.pop_back();

    if(!store_element)
    {
    return{false,nullptr};
    }

    JSON_ASSERT(object_element);
    *object_element=std::move(value);
    return{true,object_element};
    }

    BasicJsonType&root;
    std::vector<BasicJsonType*>ref_stack{};
    std::vector<bool>keep_stack{};
    std::vector<bool>key_keep_stack{};
    BasicJsonType*object_element=nullptr;
    boolerrored=false;
    constparser_callback_tcallback=nullptr;
    constboolallow_exceptions=true;
    BasicJsonTypediscarded=BasicJsonType::value_t::discarded;
    };

    template<typenameBasicJsonType>
    classjson_sax_acceptor
    {
    public:
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;

    boolnull()
    {
    returntrue;
    }

    boolboolean(bool/*unused*/)
    {
    returntrue;
    }

    boolnumber_integer(number_integer_t/*unused*/)
    {
    returntrue;
    }

    boolnumber_unsigned(number_unsigned_t/*unused*/)
    {
    returntrue;
    }

    boolnumber_float(number_float_t/*unused*/,conststring_t&/*unused*/)
    {
    returntrue;
    }

    boolstring(string_t&/*unused*/)
    {
    returntrue;
    }

    boolbinary(binary_t&/*unused*/)
    {
    returntrue;
    }

    boolstart_object(std::size_t/*unused*/=std::size_t(-1))
    {
    returntrue;
    }

    boolkey(string_t&/*unused*/)
    {
    returntrue;
    }

    boolend_object()
    {
    returntrue;
    }

    boolstart_array(std::size_t/*unused*/=std::size_t(-1))
    {
    returntrue;
    }

    boolend_array()
    {
    returntrue;
    }

    boolparse_error(std::size_t/*unused*/,conststd::string&/*unused*/,constdetail::exception&/*unused*/)
    {
    returnfalse;
    }
    };
    }//namespacedetail

    }//namespacenlohmann

    //#include<nlohmann/detail/input/lexer.hpp>

    #include<array>//array
    #include<clocale>//localeconv
    #include<cstddef>//size_t
    #include<cstdio>//snprintf
    #include<cstdlib>//strtof,strtod,strtold,strtoll,strtoull
    #include<initializer_list>//initializer_list
    #include<string>//char_traits,string
    #include<utility>//move
    #include<vector>//vector

    //#include<nlohmann/detail/input/input_adapters.hpp>

    //#include<nlohmann/detail/input/position_t.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //lexer//

    template<typenameBasicJsonType>
    classlexer_base
    {
    public:
    enumclasstoken_type
    {
    uninitialized,
    literal_true,
    literal_false,
    literal_null,
    value_string,
    value_unsigned,
    value_integer,
    value_float,
    begin_array,
    begin_object,
    end_array,
    end_object,
    name_separator,
    value_separator,
    parse_error,
    end_of_input,
    literal_or_value
    };

    JSON_HEDLEY_RETURNS_NON_NULL
    JSON_HEDLEY_CONST
    staticconstchar*token_type_name(consttoken_typet)noexcept
    {
    switch(t)
    {
    casetoken_type::uninitialized:
    return"<uninitialized>";
    casetoken_type::literal_true:
    return"trueliteral";
    casetoken_type::literal_false:
    return"falseliteral";
    casetoken_type::literal_null:
    return"nullliteral";
    casetoken_type::value_string:
    return"stringliteral";
    casetoken_type::value_unsigned:
    casetoken_type::value_integer:
    casetoken_type::value_float:
    return"numberliteral";
    casetoken_type::begin_array:
    return"'['";
    casetoken_type::begin_object:
    return"'{'";
    casetoken_type::end_array:
    return"']'";
    casetoken_type::end_object:
    return"'}'";
    casetoken_type::name_separator:
    return"':'";
    casetoken_type::value_separator:
    return"','";
    casetoken_type::parse_error:
    return"<parseerror>";
    casetoken_type::end_of_input:
    return"endofinput";
    casetoken_type::literal_or_value:
    return"'[','{',oraliteral";
    //LCOV_EXCL_START
    default://catchnon-enumvalues
    return"unknowntoken";
    //LCOV_EXCL_STOP
    }
    }
    };
    template<typenameBasicJsonType,typenameInputAdapterType>
    classlexer:publiclexer_base<BasicJsonType>
    {
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingchar_type=typenameInputAdapterType::char_type;
    usingchar_int_type=typenamestd::char_traits<char_type>::int_type;

    public:
    usingtoken_type=typenamelexer_base<BasicJsonType>::token_type;

    explicitlexer(InputAdapterType&&adapter,boolignore_comments_=false)noexcept
    :ia(std::move(adapter))
    ,ignore_comments(ignore_comments_)
    ,decimal_point_char(static_cast<char_int_type>(get_decimal_point()))
    {}

    //deletebecauseofpointermembers
    lexer(constlexer&)=delete;
    lexer(lexer&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    lexer&operator=(lexer&)=delete;
    lexer&operator=(lexer&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    ~lexer()=default;

    private:
    //locales

    JSON_HEDLEY_PURE
    staticcharget_decimal_point()noexcept
    {
    constauto*loc=localeconv();
    JSON_ASSERT(loc!=nullptr);
    return(loc->decimal_point==nullptr)?'.':*(loc->decimal_point);
    }

    //scanfunctions

    intget_codepoint()
    {
    //thisfunctiononlymakessenseafterreading`\u`
    JSON_ASSERT(current=='u');
    intcodepoint=0;

    constautofactors={12u,8u,4u,0u};
    for(constautofactor:factors)
    {
    get();

    if(current>='0'&&current<='9')
    {
    codepoint+=static_cast<int>((static_cast<unsignedint>(current)-0x30u)<<factor);
    }
    elseif(current>='A'&&current<='F')
    {
    codepoint+=static_cast<int>((static_cast<unsignedint>(current)-0x37u)<<factor);
    }
    elseif(current>='a'&&current<='f')
    {
    codepoint+=static_cast<int>((static_cast<unsignedint>(current)-0x57u)<<factor);
    }
    else
    {
    return-1;
    }
    }

    JSON_ASSERT(0x0000<=codepoint&&codepoint<=0xFFFF);
    returncodepoint;
    }

    boolnext_byte_in_range(std::initializer_list<char_int_type>ranges)
    {
    JSON_ASSERT(ranges.size()==2||ranges.size()==4||ranges.size()==6);
    add(current);

    for(autorange=ranges.begin();range!=ranges.end();++range)
    {
    get();
    if(JSON_HEDLEY_LIKELY(*range<=current&&current<=*(++range)))
    {
    add(current);
    }
    else
    {
    error_message="invalidstring:ill-formedUTF-8byte";
    returnfalse;
    }
    }

    returntrue;
    }

    token_typescan_string()
    {
    //resettoken_buffer(ignoreopeningquote)
    reset();

    //weenteredthefunctionbyreadinganopenquote
    JSON_ASSERT(current=='\"');

    while(true)
    {
    //getnextcharacter
    switch(get())
    {
    //endoffilewhileparsingstring
    casestd::char_traits<char_type>::eof():
    {
    error_message="invalidstring:missingclosingquote";
    returntoken_type::parse_error;
    }

    //closingquote
    case'\"':
    {
    returntoken_type::value_string;
    }

    //escapes
    case'\\':
    {
    switch(get())
    {
    //quotationmark
    case'\"':
    add('\"');
    break;
    //reversesolidus
    case'\\':
    add('\\');
    break;
    //solidus
    case'/':
    add('/');
    break;
    //backspace
    case'b':
    add('\b');
    break;
    //formfeed
    case'f':
    add('\f');
    break;
    //linefeed
    case'n':
    add('\n');
    break;
    //carriagereturn
    case'r':
    add('\r');
    break;
    //tab
    case't':
    add('\t');
    break;

    //unicodeescapes
    case'u':
    {
    constintcodepoint1=get_codepoint();
    intcodepoint=codepoint1;//startwithcodepoint1

    if(JSON_HEDLEY_UNLIKELY(codepoint1==-1))
    {
    error_message="invalidstring:'\\u'mustbefollowedby4hexdigits";
    returntoken_type::parse_error;
    }

    //checkifcodepointisahighsurrogate
    if(0xD800<=codepoint1&&codepoint1<=0xDBFF)
    {
    //expectnext\uxxxxentry
    if(JSON_HEDLEY_LIKELY(get()=='\\'&&get()=='u'))
    {
    constintcodepoint2=get_codepoint();

    if(JSON_HEDLEY_UNLIKELY(codepoint2==-1))
    {
    error_message="invalidstring:'\\u'mustbefollowedby4hexdigits";
    returntoken_type::parse_error;
    }

    //checkifcodepoint2isalowsurrogate
    if(JSON_HEDLEY_LIKELY(0xDC00<=codepoint2&&codepoint2<=0xDFFF))
    {
    //overwritecodepoint
    codepoint=static_cast<int>(
    //highsurrogateoccupiesthemostsignificant22bits
    (static_cast<unsignedint>(codepoint1)<<10u)
    //lowsurrogateoccupiestheleastsignificant15bits
    +static_cast<unsignedint>(codepoint2)
    //thereisstillthe0xD800,0xDC00and0x10000noise
    //intheresultsowehavetosubtractwith:
    //(0xD800<<10)+DC00-0x10000=0x35FDC00
    -0x35FDC00u);
    }
    else
    {
    error_message="invalidstring:surrogateU+D800..U+DBFFmustbefollowedbyU+DC00..U+DFFF";
    returntoken_type::parse_error;
    }
    }
    else
    {
    error_message="invalidstring:surrogateU+D800..U+DBFFmustbefollowedbyU+DC00..U+DFFF";
    returntoken_type::parse_error;
    }
    }
    else
    {
    if(JSON_HEDLEY_UNLIKELY(0xDC00<=codepoint1&&codepoint1<=0xDFFF))
    {
    error_message="invalidstring:surrogateU+DC00..U+DFFFmustfollowU+D800..U+DBFF";
    returntoken_type::parse_error;
    }
    }

    //resultoftheabovecalculationyieldsapropercodepoint
    JSON_ASSERT(0x00<=codepoint&&codepoint<=0x10FFFF);

    //translatecodepointintobytes
    if(codepoint<0x80)
    {
    //1-bytecharacters:0xxxxxxx(ASCII)
    add(static_cast<char_int_type>(codepoint));
    }
    elseif(codepoint<=0x7FF)
    {
    //2-bytecharacters:110xxxxx10xxxxxx
    add(static_cast<char_int_type>(0xC0u|(static_cast<unsignedint>(codepoint)>>6u)));
    add(static_cast<char_int_type>(0x80u|(static_cast<unsignedint>(codepoint)&0x3Fu)));
    }
    elseif(codepoint<=0xFFFF)
    {
    //3-bytecharacters:1110xxxx10xxxxxx10xxxxxx
    add(static_cast<char_int_type>(0xE0u|(static_cast<unsignedint>(codepoint)>>12u)));
    add(static_cast<char_int_type>(0x80u|((static_cast<unsignedint>(codepoint)>>6u)&0x3Fu)));
    add(static_cast<char_int_type>(0x80u|(static_cast<unsignedint>(codepoint)&0x3Fu)));
    }
    else
    {
    //4-bytecharacters:11110xxx10xxxxxx10xxxxxx10xxxxxx
    add(static_cast<char_int_type>(0xF0u|(static_cast<unsignedint>(codepoint)>>18u)));
    add(static_cast<char_int_type>(0x80u|((static_cast<unsignedint>(codepoint)>>12u)&0x3Fu)));
    add(static_cast<char_int_type>(0x80u|((static_cast<unsignedint>(codepoint)>>6u)&0x3Fu)));
    add(static_cast<char_int_type>(0x80u|(static_cast<unsignedint>(codepoint)&0x3Fu)));
    }

    break;
    }

    //othercharactersafterescape
    default:
    error_message="invalidstring:forbiddencharacterafterbackslash";
    returntoken_type::parse_error;
    }

    break;
    }

    //invalidcontrolcharacters
    case0x00:
    {
    error_message="invalidstring:controlcharacterU+0000(NUL)mustbeescapedto\\u0000";
    returntoken_type::parse_error;
    }

    case0x01:
    {
    error_message="invalidstring:controlcharacterU+0001(SOH)mustbeescapedto\\u0001";
    returntoken_type::parse_error;
    }

    case0x02:
    {
    error_message="invalidstring:controlcharacterU+0002(STX)mustbeescapedto\\u0002";
    returntoken_type::parse_error;
    }

    case0x03:
    {
    error_message="invalidstring:controlcharacterU+0003(ETX)mustbeescapedto\\u0003";
    returntoken_type::parse_error;
    }

    case0x04:
    {
    error_message="invalidstring:controlcharacterU+0004(EOT)mustbeescapedto\\u0004";
    returntoken_type::parse_error;
    }

    case0x05:
    {
    error_message="invalidstring:controlcharacterU+0005(ENQ)mustbeescapedto\\u0005";
    returntoken_type::parse_error;
    }

    case0x06:
    {
    error_message="invalidstring:controlcharacterU+0006(ACK)mustbeescapedto\\u0006";
    returntoken_type::parse_error;
    }

    case0x07:
    {
    error_message="invalidstring:controlcharacterU+0007(BEL)mustbeescapedto\\u0007";
    returntoken_type::parse_error;
    }

    case0x08:
    {
    error_message="invalidstring:controlcharacterU+0008(BS)mustbeescapedto\\u0008or\\b";
    returntoken_type::parse_error;
    }

    case0x09:
    {
    error_message="invalidstring:controlcharacterU+0009(HT)mustbeescapedto\\u0009or\\t";
    returntoken_type::parse_error;
    }

    case0x0A:
    {
    error_message="invalidstring:controlcharacterU+000A(LF)mustbeescapedto\\u000Aor\\n";
    returntoken_type::parse_error;
    }

    case0x0B:
    {
    error_message="invalidstring:controlcharacterU+000B(VT)mustbeescapedto\\u000B";
    returntoken_type::parse_error;
    }

    case0x0C:
    {
    error_message="invalidstring:controlcharacterU+000C(FF)mustbeescapedto\\u000Cor\\f";
    returntoken_type::parse_error;
    }

    case0x0D:
    {
    error_message="invalidstring:controlcharacterU+000D(CR)mustbeescapedto\\u000Dor\\r";
    returntoken_type::parse_error;
    }

    case0x0E:
    {
    error_message="invalidstring:controlcharacterU+000E(SO)mustbeescapedto\\u000E";
    returntoken_type::parse_error;
    }

    case0x0F:
    {
    error_message="invalidstring:controlcharacterU+000F(SI)mustbeescapedto\\u000F";
    returntoken_type::parse_error;
    }

    case0x10:
    {
    error_message="invalidstring:controlcharacterU+0010(DLE)mustbeescapedto\\u0010";
    returntoken_type::parse_error;
    }

    case0x11:
    {
    error_message="invalidstring:controlcharacterU+0011(DC1)mustbeescapedto\\u0011";
    returntoken_type::parse_error;
    }

    case0x12:
    {
    error_message="invalidstring:controlcharacterU+0012(DC2)mustbeescapedto\\u0012";
    returntoken_type::parse_error;
    }

    case0x13:
    {
    error_message="invalidstring:controlcharacterU+0013(DC3)mustbeescapedto\\u0013";
    returntoken_type::parse_error;
    }

    case0x14:
    {
    error_message="invalidstring:controlcharacterU+0014(DC4)mustbeescapedto\\u0014";
    returntoken_type::parse_error;
    }

    case0x15:
    {
    error_message="invalidstring:controlcharacterU+0015(NAK)mustbeescapedto\\u0015";
    returntoken_type::parse_error;
    }

    case0x16:
    {
    error_message="invalidstring:controlcharacterU+0016(SYN)mustbeescapedto\\u0016";
    returntoken_type::parse_error;
    }

    case0x17:
    {
    error_message="invalidstring:controlcharacterU+0017(ETB)mustbeescapedto\\u0017";
    returntoken_type::parse_error;
    }

    case0x18:
    {
    error_message="invalidstring:controlcharacterU+0018(CAN)mustbeescapedto\\u0018";
    returntoken_type::parse_error;
    }

    case0x19:
    {
    error_message="invalidstring:controlcharacterU+0019(EM)mustbeescapedto\\u0019";
    returntoken_type::parse_error;
    }

    case0x1A:
    {
    error_message="invalidstring:controlcharacterU+001A(SUB)mustbeescapedto\\u001A";
    returntoken_type::parse_error;
    }

    case0x1B:
    {
    error_message="invalidstring:controlcharacterU+001B(ESC)mustbeescapedto\\u001B";
    returntoken_type::parse_error;
    }

    case0x1C:
    {
    error_message="invalidstring:controlcharacterU+001C(FS)mustbeescapedto\\u001C";
    returntoken_type::parse_error;
    }

    case0x1D:
    {
    error_message="invalidstring:controlcharacterU+001D(GS)mustbeescapedto\\u001D";
    returntoken_type::parse_error;
    }

    case0x1E:
    {
    error_message="invalidstring:controlcharacterU+001E(RS)mustbeescapedto\\u001E";
    returntoken_type::parse_error;
    }

    case0x1F:
    {
    error_message="invalidstring:controlcharacterU+001F(US)mustbeescapedto\\u001F";
    returntoken_type::parse_error;
    }

    //U+0020..U+007F(exceptU+0022(quote)andU+005C(backspace))
    case0x20:
    case0x21:
    case0x23:
    case0x24:
    case0x25:
    case0x26:
    case0x27:
    case0x28:
    case0x29:
    case0x2A:
    case0x2B:
    case0x2C:
    case0x2D:
    case0x2E:
    case0x2F:
    case0x30:
    case0x31:
    case0x32:
    case0x33:
    case0x34:
    case0x35:
    case0x36:
    case0x37:
    case0x38:
    case0x39:
    case0x3A:
    case0x3B:
    case0x3C:
    case0x3D:
    case0x3E:
    case0x3F:
    case0x40:
    case0x41:
    case0x42:
    case0x43:
    case0x44:
    case0x45:
    case0x46:
    case0x47:
    case0x48:
    case0x49:
    case0x4A:
    case0x4B:
    case0x4C:
    case0x4D:
    case0x4E:
    case0x4F:
    case0x50:
    case0x51:
    case0x52:
    case0x53:
    case0x54:
    case0x55:
    case0x56:
    case0x57:
    case0x58:
    case0x59:
    case0x5A:
    case0x5B:
    case0x5D:
    case0x5E:
    case0x5F:
    case0x60:
    case0x61:
    case0x62:
    case0x63:
    case0x64:
    case0x65:
    case0x66:
    case0x67:
    case0x68:
    case0x69:
    case0x6A:
    case0x6B:
    case0x6C:
    case0x6D:
    case0x6E:
    case0x6F:
    case0x70:
    case0x71:
    case0x72:
    case0x73:
    case0x74:
    case0x75:
    case0x76:
    case0x77:
    case0x78:
    case0x79:
    case0x7A:
    case0x7B:
    case0x7C:
    case0x7D:
    case0x7E:
    case0x7F:
    {
    add(current);
    break;
    }

    //U+0080..U+07FF:bytesC2..DF80..BF
    case0xC2:
    case0xC3:
    case0xC4:
    case0xC5:
    case0xC6:
    case0xC7:
    case0xC8:
    case0xC9:
    case0xCA:
    case0xCB:
    case0xCC:
    case0xCD:
    case0xCE:
    case0xCF:
    case0xD0:
    case0xD1:
    case0xD2:
    case0xD3:
    case0xD4:
    case0xD5:
    case0xD6:
    case0xD7:
    case0xD8:
    case0xD9:
    case0xDA:
    case0xDB:
    case0xDC:
    case0xDD:
    case0xDE:
    case0xDF:
    {
    if(JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80,0xBF})))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+0800..U+0FFF:bytesE0A0..BF80..BF
    case0xE0:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0,0xBF,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+1000..U+CFFF:bytesE1..EC80..BF80..BF
    //U+E000..U+FFFF:bytesEE..EF80..BF80..BF
    case0xE1:
    case0xE2:
    case0xE3:
    case0xE4:
    case0xE5:
    case0xE6:
    case0xE7:
    case0xE8:
    case0xE9:
    case0xEA:
    case0xEB:
    case0xEC:
    case0xEE:
    case0xEF:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80,0xBF,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+D000..U+D7FF:bytesED80..9F80..BF
    case0xED:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80,0x9F,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+10000..U+3FFFFF090..BF80..BF80..BF
    case0xF0:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90,0xBF,0x80,0xBF,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+40000..U+FFFFFF1..F380..BF80..BF80..BF
    case0xF1:
    case0xF2:
    case0xF3:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80,0xBF,0x80,0xBF,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //U+100000..U+10FFFFF480..8F80..BF80..BF
    case0xF4:
    {
    if(JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80,0x8F,0x80,0xBF,0x80,0xBF}))))
    {
    returntoken_type::parse_error;
    }
    break;
    }

    //remainingbytes(80..C1andF5..FF)areill-formed
    default:
    {
    error_message="invalidstring:ill-formedUTF-8byte";
    returntoken_type::parse_error;
    }
    }
    }
    }

    boolscan_comment()
    {
    switch(get())
    {
    //single-linecommentsskipinputuntilanewlineorEOFisread
    case'/':
    {
    while(true)
    {
    switch(get())
    {
    case'\n':
    case'\r':
    casestd::char_traits<char_type>::eof():
    case'\0':
    returntrue;

    default:
    break;
    }
    }
    }

    //multi-linecommentsskipinputuntil*/isread
    case'*':
    {
    while(true)
    {
    switch(get())
    {
    casestd::char_traits<char_type>::eof():
    case'\0':
    {
    error_message="invalidcomment;missingclosing'*/'";
    returnfalse;
    }

    case'*':
    {
    switch(get())
    {
    case'/':
    returntrue;

    default:
    {
    unget();
    continue;
    }
    }
    }

    default:
    continue;
    }
    }
    }

    //unexpectedcharacterafterreading'/'
    default:
    {
    error_message="invalidcomment;expecting'/'or'*'after'/'";
    returnfalse;
    }
    }
    }

    JSON_HEDLEY_NON_NULL(2)
    staticvoidstrtof(float&f,constchar*str,char**endptr)noexcept
    {
    f=std::strtof(str,endptr);
    }

    JSON_HEDLEY_NON_NULL(2)
    staticvoidstrtof(double&f,constchar*str,char**endptr)noexcept
    {
    f=std::strtod(str,endptr);
    }

    JSON_HEDLEY_NON_NULL(2)
    staticvoidstrtof(longdouble&f,constchar*str,char**endptr)noexcept
    {
    f=std::strtold(str,endptr);
    }

    token_typescan_number()//lgtm[cpp/use-of-goto]
    {
    //resettoken_buffertostorethenumber'sbytes
    reset();

    //thetypeoftheparsednumber;initiallysettounsigned;willbe
    //changedifminussign,decimalpointorexponentisread
    token_typenumber_type=token_type::value_unsigned;

    //state(init):wejustfoundoutweneedtoscananumber
    switch(current)
    {
    case'-':
    {
    add(current);
    gotoscan_number_minus;
    }

    case'0':
    {
    add(current);
    gotoscan_number_zero;
    }

    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any1;
    }

    //allothercharactersarerejectedoutsidescan_number()
    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }

    scan_number_minus:
    //state:wejustparsedaleadingminussign
    number_type=token_type::value_integer;
    switch(get())
    {
    case'0':
    {
    add(current);
    gotoscan_number_zero;
    }

    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any1;
    }

    default:
    {
    error_message="invalidnumber;expecteddigitafter'-'";
    returntoken_type::parse_error;
    }
    }

    scan_number_zero:
    //state:wejustparseazero(maybewithaleadingminussign)
    switch(get())
    {
    case'.':
    {
    add(decimal_point_char);
    gotoscan_number_decimal1;
    }

    case'e':
    case'E':
    {
    add(current);
    gotoscan_number_exponent;
    }

    default:
    gotoscan_number_done;
    }

    scan_number_any1:
    //state:wejustparsedanumber0-9(maybewithaleadingminussign)
    switch(get())
    {
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any1;
    }

    case'.':
    {
    add(decimal_point_char);
    gotoscan_number_decimal1;
    }

    case'e':
    case'E':
    {
    add(current);
    gotoscan_number_exponent;
    }

    default:
    gotoscan_number_done;
    }

    scan_number_decimal1:
    //state:wejustparsedadecimalpoint
    number_type=token_type::value_float;
    switch(get())
    {
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_decimal2;
    }

    default:
    {
    error_message="invalidnumber;expecteddigitafter'.'";
    returntoken_type::parse_error;
    }
    }

    scan_number_decimal2:
    //wejustparsedatleastonenumberafteradecimalpoint
    switch(get())
    {
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_decimal2;
    }

    case'e':
    case'E':
    {
    add(current);
    gotoscan_number_exponent;
    }

    default:
    gotoscan_number_done;
    }

    scan_number_exponent:
    //wejustparsedanexponent
    number_type=token_type::value_float;
    switch(get())
    {
    case'+':
    case'-':
    {
    add(current);
    gotoscan_number_sign;
    }

    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any2;
    }

    default:
    {
    error_message=
    "invalidnumber;expected'+','-',ordigitafterexponent";
    returntoken_type::parse_error;
    }
    }

    scan_number_sign:
    //wejustparsedanexponentsign
    switch(get())
    {
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any2;
    }

    default:
    {
    error_message="invalidnumber;expecteddigitafterexponentsign";
    returntoken_type::parse_error;
    }
    }

    scan_number_any2:
    //wejustparsedanumberaftertheexponentorexponentsign
    switch(get())
    {
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    {
    add(current);
    gotoscan_number_any2;
    }

    default:
    gotoscan_number_done;
    }

    scan_number_done:
    //ungetthecharacterafterthenumber(weonlyreadittoknowthat
    //wearedonescanninganumber)
    unget();

    char*endptr=nullptr;//NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    errno=0;

    //trytoparseintegersfirstandfallbacktofloats
    if(number_type==token_type::value_unsigned)
    {
    constautox=std::strtoull(token_buffer.data(),&endptr,10);

    //wecheckedthenumberformatbefore
    JSON_ASSERT(endptr==token_buffer.data()+token_buffer.size());

    if(errno==0)
    {
    value_unsigned=static_cast<number_unsigned_t>(x);
    if(value_unsigned==x)
    {
    returntoken_type::value_unsigned;
    }
    }
    }
    elseif(number_type==token_type::value_integer)
    {
    constautox=std::strtoll(token_buffer.data(),&endptr,10);

    //wecheckedthenumberformatbefore
    JSON_ASSERT(endptr==token_buffer.data()+token_buffer.size());

    if(errno==0)
    {
    value_integer=static_cast<number_integer_t>(x);
    if(value_integer==x)
    {
    returntoken_type::value_integer;
    }
    }
    }

    //thiscodeisreachedifweparseafloating-pointnumberorifan
    //integerconversionabovefailed
    strtof(value_float,token_buffer.data(),&endptr);

    //wecheckedthenumberformatbefore
    JSON_ASSERT(endptr==token_buffer.data()+token_buffer.size());

    returntoken_type::value_float;
    }

    JSON_HEDLEY_NON_NULL(2)
    token_typescan_literal(constchar_type*literal_text,conststd::size_tlength,
    token_typereturn_type)
    {
    JSON_ASSERT(std::char_traits<char_type>::to_char_type(current)==literal_text[0]);
    for(std::size_ti=1;i<length;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(std::char_traits<char_type>::to_char_type(get())!=literal_text[i]))
    {
    error_message="invalidliteral";
    returntoken_type::parse_error;
    }
    }
    returnreturn_type;
    }

    //inputmanagement

    voidreset()noexcept
    {
    token_buffer.clear();
    token_string.clear();
    token_string.push_back(std::char_traits<char_type>::to_char_type(current));
    }

    /*
    @briefgetnextcharacterfromtheinput

    Thisfunctionprovidestheinterfacetotheusedinputadapter.Itdoes
    notthrowincasetheinputreachedEOF,butreturnsa
    `std::char_traits<char>::eof()`inthatcase.Storesthescannedcharacters
    foruseinerrormessages.

    @returncharacterreadfromtheinput
    */
    char_int_typeget()
    {
    ++position.chars_read_total;
    ++position.chars_read_current_line;

    if(next_unget)
    {
    //justresetthenext_ungetvariableandworkwithcurrent
    next_unget=false;
    }
    else
    {
    current=ia.get_character();
    }

    if(JSON_HEDLEY_LIKELY(current!=std::char_traits<char_type>::eof()))
    {
    token_string.push_back(std::char_traits<char_type>::to_char_type(current));
    }

    if(current=='\n')
    {
    ++position.lines_read;
    position.chars_read_current_line=0;
    }

    returncurrent;
    }

    voidunget()
    {
    next_unget=true;

    --position.chars_read_total;

    //incasewe"unget"anewline,wehavetoalsodecrementthelines_read
    if(position.chars_read_current_line==0)
    {
    if(position.lines_read>0)
    {
    --position.lines_read;
    }
    }
    else
    {
    --position.chars_read_current_line;
    }

    if(JSON_HEDLEY_LIKELY(current!=std::char_traits<char_type>::eof()))
    {
    JSON_ASSERT(!token_string.empty());
    token_string.pop_back();
    }
    }

    voidadd(char_int_typec)
    {
    token_buffer.push_back(static_cast<typenamestring_t::value_type>(c));
    }

    public:
    //valuegetters

    constexprnumber_integer_tget_number_integer()constnoexcept
    {
    returnvalue_integer;
    }

    constexprnumber_unsigned_tget_number_unsigned()constnoexcept
    {
    returnvalue_unsigned;
    }

    constexprnumber_float_tget_number_float()constnoexcept
    {
    returnvalue_float;
    }

    string_t&get_string()
    {
    returntoken_buffer;
    }

    //diagnostics

    constexprposition_tget_position()constnoexcept
    {
    returnposition;
    }

    std::stringget_token_string()const
    {
    //escapecontrolcharacters
    std::stringresult;
    for(constautoc:token_string)
    {
    if(static_cast<unsignedchar>(c)<='\x1F')
    {
    //escapecontrolcharacters
    std::array<char,9>cs{{}};
    (std::snprintf)(cs.data(),cs.size(),"<U+%.4X>",static_cast<unsignedchar>(c));//NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    result+=cs.data();
    }
    else
    {
    //addcharacterasis
    result.push_back(static_cast<std::string::value_type>(c));
    }
    }

    returnresult;
    }

    JSON_HEDLEY_RETURNS_NON_NULL
    constexprconstchar*get_error_message()constnoexcept
    {
    returnerror_message;
    }

    //actualscanner

    boolskip_bom()
    {
    if(get()==0xEF)
    {
    //checkifwecompletelyparsetheBOM
    returnget()==0xBB&&get()==0xBF;
    }

    //thefirstcharacterisnotthebeginningoftheBOM;ungetitto
    //processislater
    unget();
    returntrue;
    }

    voidskip_whitespace()
    {
    do
    {
    get();
    }
    while(current==''||current=='\t'||current=='\n'||current=='\r');
    }

    token_typescan()
    {
    //initially,skiptheBOM
    if(position.chars_read_total==0&&!skip_bom())
    {
    error_message="invalidBOM;mustbe0xEF0xBB0xBFifgiven";
    returntoken_type::parse_error;
    }

    //readnextcharacterandignorewhitespace
    skip_whitespace();

    //ignorecomments
    while(ignore_comments&&current=='/')
    {
    if(!scan_comment())
    {
    returntoken_type::parse_error;
    }

    //skipfollowingwhitespace
    skip_whitespace();
    }

    switch(current)
    {
    //structuralcharacters
    case'[':
    returntoken_type::begin_array;
    case']':
    returntoken_type::end_array;
    case'{':
    returntoken_type::begin_object;
    case'}':
    returntoken_type::end_object;
    case':':
    returntoken_type::name_separator;
    case',':
    returntoken_type::value_separator;

    //literals
    case't':
    {
    std::array<char_type,4>true_literal={{char_type('t'),char_type('r'),char_type('u'),char_type('e')}};
    returnscan_literal(true_literal.data(),true_literal.size(),token_type::literal_true);
    }
    case'f':
    {
    std::array<char_type,5>false_literal={{char_type('f'),char_type('a'),char_type('l'),char_type('s'),char_type('e')}};
    returnscan_literal(false_literal.data(),false_literal.size(),token_type::literal_false);
    }
    case'n':
    {
    std::array<char_type,4>null_literal={{char_type('n'),char_type('u'),char_type('l'),char_type('l')}};
    returnscan_literal(null_literal.data(),null_literal.size(),token_type::literal_null);
    }

    //string
    case'\"':
    returnscan_string();

    //number
    case'-':
    case'0':
    case'1':
    case'2':
    case'3':
    case'4':
    case'5':
    case'6':
    case'7':
    case'8':
    case'9':
    returnscan_number();

    //endofinput(thenullbyteisneededwhenparsingfrom
    //stringliterals)
    case'\0':
    casestd::char_traits<char_type>::eof():
    returntoken_type::end_of_input;

    //error
    default:
    error_message="invalidliteral";
    returntoken_type::parse_error;
    }
    }

    private:
    InputAdapterTypeia;

    constboolignore_comments=false;

    char_int_typecurrent=std::char_traits<char_type>::eof();

    boolnext_unget=false;

    position_tposition{};

    std::vector<char_type>token_string{};

    string_ttoken_buffer{};

    constchar*error_message="";

    //numbervalues
    number_integer_tvalue_integer=0;
    number_unsigned_tvalue_unsigned=0;
    number_float_tvalue_float=0;

    constchar_int_typedecimal_point_char='.';
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/is_sax.hpp>

    #include<cstdint>//size_t
    #include<utility>//declval
    #include<string>//string

    //#include<nlohmann/detail/meta/detected.hpp>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameT>
    usingnull_function_t=decltype(std::declval<T&>().null());

    template<typenameT>
    usingboolean_function_t=
    decltype(std::declval<T&>().boolean(std::declval<bool>()));

    template<typenameT,typenameInteger>
    usingnumber_integer_function_t=
    decltype(std::declval<T&>().number_integer(std::declval<Integer>()));

    template<typenameT,typenameUnsigned>
    usingnumber_unsigned_function_t=
    decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>()));

    template<typenameT,typenameFloat,typenameString>
    usingnumber_float_function_t=decltype(std::declval<T&>().number_float(
    std::declval<Float>(),std::declval<constString&>()));

    template<typenameT,typenameString>
    usingstring_function_t=
    decltype(std::declval<T&>().string(std::declval<String&>()));

    template<typenameT,typenameBinary>
    usingbinary_function_t=
    decltype(std::declval<T&>().binary(std::declval<Binary&>()));

    template<typenameT>
    usingstart_object_function_t=
    decltype(std::declval<T&>().start_object(std::declval<std::size_t>()));

    template<typenameT,typenameString>
    usingkey_function_t=
    decltype(std::declval<T&>().key(std::declval<String&>()));

    template<typenameT>
    usingend_object_function_t=decltype(std::declval<T&>().end_object());

    template<typenameT>
    usingstart_array_function_t=
    decltype(std::declval<T&>().start_array(std::declval<std::size_t>()));

    template<typenameT>
    usingend_array_function_t=decltype(std::declval<T&>().end_array());

    template<typenameT,typenameException>
    usingparse_error_function_t=decltype(std::declval<T&>().parse_error(
    std::declval<std::size_t>(),std::declval<conststd::string&>(),
    std::declval<constException&>()));

    template<typenameSAX,typenameBasicJsonType>
    structis_sax
    {
    private:
    static_assert(is_basic_json<BasicJsonType>::value,
    "BasicJsonTypemustbeoftypebasic_json<...>");

    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;
    usingexception_t=typenameBasicJsonType::exception;

    public:
    staticconstexprboolvalue=
    is_detected_exact<bool, null_function_t, SAX>::value&&
    is_detected_exact<bool, boolean_function_t, SAX>::value&&
    is_detected_exact<bool, number_integer_function_t, SAX, number_integer_t>::value&&
    is_detected_exact<bool, number_unsigned_function_t, SAX, number_unsigned_t>::value&&
    is_detected_exact<bool, number_float_function_t, SAX, number_float_t, string_t>::value&&
    is_detected_exact<bool, string_function_t, SAX, string_t>::value&&
    is_detected_exact<bool, binary_function_t, SAX, binary_t>::value&&
    is_detected_exact<bool, start_object_function_t, SAX>::value&&
    is_detected_exact<bool, key_function_t, SAX, string_t>::value&&
    is_detected_exact<bool, end_object_function_t, SAX>::value&&
    is_detected_exact<bool, start_array_function_t, SAX>::value&&
    is_detected_exact<bool, end_array_function_t, SAX>::value&&
    is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value;
    };

    template<typenameSAX,typenameBasicJsonType>
    structis_sax_static_asserts
    {
    private:
    static_assert(is_basic_json<BasicJsonType>::value,
    "BasicJsonTypemustbeoftypebasic_json<...>");

    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;
    usingexception_t=typenameBasicJsonType::exception;

    public:
    static_assert(is_detected_exact<bool, null_function_t, SAX>::value,
    "Missing/invalidfunction:boolnull()");
    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,
    "Missing/invalidfunction:boolboolean(bool)");
    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,
    "Missing/invalidfunction:boolboolean(bool)");
    static_assert(
    is_detected_exact<bool,number_integer_function_t,SAX,
    number_integer_t>::value,
    "Missing/invalidfunction:boolnumber_integer(number_integer_t)");
    static_assert(
    is_detected_exact<bool,number_unsigned_function_t,SAX,
    number_unsigned_t>::value,
    "Missing/invalidfunction:boolnumber_unsigned(number_unsigned_t)");
    static_assert(is_detected_exact<bool,number_float_function_t,SAX,
    number_float_t,string_t>::value,
    "Missing/invalidfunction:boolnumber_float(number_float_t,conststring_t&)");
    static_assert(
    is_detected_exact<bool, string_function_t, SAX, string_t>::value,
    "Missing/invalidfunction:boolstring(string_t&)");
    static_assert(
    is_detected_exact<bool, binary_function_t, SAX, binary_t>::value,
    "Missing/invalidfunction:boolbinary(binary_t&)");
    static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value,
    "Missing/invalidfunction:boolstart_object(std::size_t)");
    static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value,
    "Missing/invalidfunction:boolkey(string_t&)");
    static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value,
    "Missing/invalidfunction:boolend_object()");
    static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value,
    "Missing/invalidfunction:boolstart_array(std::size_t)");
    static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value,
    "Missing/invalidfunction:boolend_array()");
    static_assert(
    is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value,
    "Missing/invalidfunction:boolparse_error(std::size_t,const"
    "std::string&,constexception&)");
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {

    enumclasscbor_tag_handler_t
    {
    error,
    ignore
    };

    staticinlineboollittle_endianess(intnum=1)noexcept
    {
    return*reinterpret_cast<char*>(&num)==1;
    }

    //binaryreader//

    template<typenameBasicJsonType,typenameInputAdapterType,typenameSAX=json_sax_dom_parser<BasicJsonType>>
    classbinary_reader
    {
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;
    usingjson_sax_t=SAX;
    usingchar_type=typenameInputAdapterType::char_type;
    usingchar_int_type=typenamestd::char_traits<char_type>::int_type;

    public:
    explicitbinary_reader(InputAdapterType&&adapter)noexcept:ia(std::move(adapter))
    {
    (void)detail::is_sax_static_asserts<SAX, BasicJsonType>{};
    }

    //makeclassmove-only
    binary_reader(constbinary_reader&)=delete;
    binary_reader(binary_reader&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    binary_reader&operator=(constbinary_reader&)=delete;
    binary_reader&operator=(binary_reader&&)=default;//NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
    ~binary_reader()=default;

    JSON_HEDLEY_NON_NULL(3)
    boolsax_parse(constinput_format_tformat,
    json_sax_t*sax_,
    constboolstrict=true,
    constcbor_tag_handler_ttag_handler=cbor_tag_handler_t::error)
    {
    sax=sax_;
    boolresult=false;

    switch(format)
    {
    caseinput_format_t::bson:
    result=parse_bson_internal();
    break;

    caseinput_format_t::cbor:
    result=parse_cbor_internal(true,tag_handler);
    break;

    caseinput_format_t::msgpack:
    result=parse_msgpack_internal();
    break;

    caseinput_format_t::ubjson:
    result=parse_ubjson_internal();
    break;

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }

    //strictmode:nextbytemustbeEOF
    if(result&&strict)
    {
    if(format==input_format_t::ubjson)
    {
    get_ignore_noop();
    }
    else
    {
    get();
    }

    if(JSON_HEDLEY_UNLIKELY(current!=std::char_traits<char_type>::eof()))
    {
    returnsax->parse_error(chars_read,get_token_string(),
    parse_error::create(110,chars_read,exception_message(format,"expectedendofinput;lastbyte:0x"+get_token_string(),"value"),BasicJsonType()));
    }
    }

    returnresult;
    }

    private:
    //BSON//

    boolparse_bson_internal()
    {
    std::int32_tdocument_size{};
    get_number<std::int32_t,true>(input_format_t::bson,document_size);

    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1))))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false)))
    {
    returnfalse;
    }

    returnsax->end_object();
    }

    boolget_bson_cstr(string_t&result)
    {
    autoout=std::back_inserter(result);
    while(true)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson,"cstring")))
    {
    returnfalse;
    }
    if(current==0x00)
    {
    returntrue;
    }
    *out++=static_cast<typenamestring_t::value_type>(current);
    }
    }

    template<typenameNumberType>
    boolget_bson_string(constNumberTypelen,string_t&result)
    {
    if(JSON_HEDLEY_UNLIKELY(len<1))
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::bson,"stringlengthmustbeatleast1,is"+std::to_string(len),"string"),BasicJsonType()));
    }

    returnget_string(input_format_t::bson,len-static_cast<NumberType>(1),result)&&get()!=std::char_traits<char_type>::eof();
    }

    template<typenameNumberType>
    boolget_bson_binary(constNumberTypelen,binary_t&result)
    {
    if(JSON_HEDLEY_UNLIKELY(len<0))
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::bson,"bytearraylengthcannotbenegative,is"+std::to_string(len),"binary"),BasicJsonType()));
    }

    //AllBSONbinaryvalueshaveasubtype
    std::uint8_tsubtype{};
    get_number<std::uint8_t>(input_format_t::bson,subtype);
    result.set_subtype(subtype);

    returnget_binary(input_format_t::bson,len,result);
    }

    boolparse_bson_element_internal(constchar_int_typeelement_type,
    conststd::size_telement_type_parse_position)
    {
    switch(element_type)
    {
    case0x01://double
    {
    doublenumber{};
    returnget_number<double,true>(input_format_t::bson,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case0x02://string
    {
    std::int32_tlen{};
    string_tvalue;
    returnget_number<std::int32_t,true>(input_format_t::bson,len)&&get_bson_string(len,value)&&sax->string(value);
    }

    case0x03://object
    {
    returnparse_bson_internal();
    }

    case0x04://array
    {
    returnparse_bson_array();
    }

    case0x05://binary
    {
    std::int32_tlen{};
    binary_tvalue;
    returnget_number<std::int32_t,true>(input_format_t::bson,len)&&get_bson_binary(len,value)&&sax->binary(value);
    }

    case0x08://boolean
    {
    returnsax->boolean(get()!=0);
    }

    case0x0A://null
    {
    returnsax->null();
    }

    case0x10://int32
    {
    std::int32_tvalue{};
    returnget_number<std::int32_t,true>(input_format_t::bson,value)&&sax->number_integer(value);
    }

    case0x12://int64
    {
    std::int64_tvalue{};
    returnget_number<std::int64_t,true>(input_format_t::bson,value)&&sax->number_integer(value);
    }

    default://anythingelsenotsupported(yet)
    {
    std::array<char,3>cr{{}};
    (std::snprintf)(cr.data(),cr.size(),"%.2hhX",static_cast<unsignedchar>(element_type));//NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    returnsax->parse_error(element_type_parse_position,std::string(cr.data()),parse_error::create(114,element_type_parse_position,"UnsupportedBSONrecordtype0x"+std::string(cr.data()),BasicJsonType()));
    }
    }
    }

    boolparse_bson_element_list(constboolis_array)
    {
    string_tkey;

    while(autoelement_type=get())
    {
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson,"elementlist")))
    {
    returnfalse;
    }

    conststd::size_telement_type_parse_position=chars_read;
    if(JSON_HEDLEY_UNLIKELY(!get_bson_cstr(key)))
    {
    returnfalse;
    }

    if(!is_array&&!sax->key(key))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type,element_type_parse_position)))
    {
    returnfalse;
    }

    //get_bson_cstronlyappends
    key.clear();
    }

    returntrue;
    }

    boolparse_bson_array()
    {
    std::int32_tdocument_size{};
    get_number<std::int32_t,true>(input_format_t::bson,document_size);

    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1))))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true)))
    {
    returnfalse;
    }

    returnsax->end_array();
    }

    //CBOR//

    boolparse_cbor_internal(constboolget_char,
    constcbor_tag_handler_ttag_handler)
    {
    switch(get_char?get():current)
    {
    //EOF
    casestd::char_traits<char_type>::eof():
    returnunexpect_eof(input_format_t::cbor,"value");

    //Integer0x00..0x17(0..23)
    case0x00:
    case0x01:
    case0x02:
    case0x03:
    case0x04:
    case0x05:
    case0x06:
    case0x07:
    case0x08:
    case0x09:
    case0x0A:
    case0x0B:
    case0x0C:
    case0x0D:
    case0x0E:
    case0x0F:
    case0x10:
    case0x11:
    case0x12:
    case0x13:
    case0x14:
    case0x15:
    case0x16:
    case0x17:
    returnsax->number_unsigned(static_cast<number_unsigned_t>(current));

    case0x18://Unsignedinteger(one-byteuint8_tfollows)
    {
    std::uint8_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_unsigned(number);
    }

    case0x19://Unsignedinteger(two-byteuint16_tfollows)
    {
    std::uint16_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_unsigned(number);
    }

    case0x1A://Unsignedinteger(four-byteuint32_tfollows)
    {
    std::uint32_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_unsigned(number);
    }

    case0x1B://Unsignedinteger(eight-byteuint64_tfollows)
    {
    std::uint64_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_unsigned(number);
    }

    //Negativeinteger-1-0x00..-1-0x17(-1..-24)
    case0x20:
    case0x21:
    case0x22:
    case0x23:
    case0x24:
    case0x25:
    case0x26:
    case0x27:
    case0x28:
    case0x29:
    case0x2A:
    case0x2B:
    case0x2C:
    case0x2D:
    case0x2E:
    case0x2F:
    case0x30:
    case0x31:
    case0x32:
    case0x33:
    case0x34:
    case0x35:
    case0x36:
    case0x37:
    returnsax->number_integer(static_cast<std::int8_t>(0x20-1-current));

    case0x38://Negativeinteger(one-byteuint8_tfollows)
    {
    std::uint8_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_integer(static_cast<number_integer_t>(-1)-number);
    }

    case0x39://Negativeinteger-1-n(two-byteuint16_tfollows)
    {
    std::uint16_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_integer(static_cast<number_integer_t>(-1)-number);
    }

    case0x3A://Negativeinteger-1-n(four-byteuint32_tfollows)
    {
    std::uint32_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_integer(static_cast<number_integer_t>(-1)-number);
    }

    case0x3B://Negativeinteger-1-n(eight-byteuint64_tfollows)
    {
    std::uint64_tnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_integer(static_cast<number_integer_t>(-1)
    -static_cast<number_integer_t>(number));
    }

    //Binarydata(0x00..0x17bytesfollow)
    case0x40:
    case0x41:
    case0x42:
    case0x43:
    case0x44:
    case0x45:
    case0x46:
    case0x47:
    case0x48:
    case0x49:
    case0x4A:
    case0x4B:
    case0x4C:
    case0x4D:
    case0x4E:
    case0x4F:
    case0x50:
    case0x51:
    case0x52:
    case0x53:
    case0x54:
    case0x55:
    case0x56:
    case0x57:
    case0x58://Binarydata(one-byteuint8_tfornfollows)
    case0x59://Binarydata(two-byteuint16_tfornfollow)
    case0x5A://Binarydata(four-byteuint32_tfornfollow)
    case0x5B://Binarydata(eight-byteuint64_tfornfollow)
    case0x5F://Binarydata(indefinitelength)
    {
    binary_tb;
    returnget_cbor_binary(b)&&sax->binary(b);
    }

    //UTF-8string(0x00..0x17bytesfollow)
    case0x60:
    case0x61:
    case0x62:
    case0x63:
    case0x64:
    case0x65:
    case0x66:
    case0x67:
    case0x68:
    case0x69:
    case0x6A:
    case0x6B:
    case0x6C:
    case0x6D:
    case0x6E:
    case0x6F:
    case0x70:
    case0x71:
    case0x72:
    case0x73:
    case0x74:
    case0x75:
    case0x76:
    case0x77:
    case0x78://UTF-8string(one-byteuint8_tfornfollows)
    case0x79://UTF-8string(two-byteuint16_tfornfollow)
    case0x7A://UTF-8string(four-byteuint32_tfornfollow)
    case0x7B://UTF-8string(eight-byteuint64_tfornfollow)
    case0x7F://UTF-8string(indefinitelength)
    {
    string_ts;
    returnget_cbor_string(s)&&sax->string(s);
    }

    //array(0x00..0x17dataitemsfollow)
    case0x80:
    case0x81:
    case0x82:
    case0x83:
    case0x84:
    case0x85:
    case0x86:
    case0x87:
    case0x88:
    case0x89:
    case0x8A:
    case0x8B:
    case0x8C:
    case0x8D:
    case0x8E:
    case0x8F:
    case0x90:
    case0x91:
    case0x92:
    case0x93:
    case0x94:
    case0x95:
    case0x96:
    case0x97:
    returnget_cbor_array(static_cast<std::size_t>(static_cast<unsignedint>(current)&0x1Fu),tag_handler);

    case0x98://array(one-byteuint8_tfornfollows)
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_array(static_cast<std::size_t>(len),tag_handler);
    }

    case0x99://array(two-byteuint16_tfornfollow)
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_array(static_cast<std::size_t>(len),tag_handler);
    }

    case0x9A://array(four-byteuint32_tfornfollow)
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_array(static_cast<std::size_t>(len),tag_handler);
    }

    case0x9B://array(eight-byteuint64_tfornfollow)
    {
    std::uint64_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_array(static_cast<std::size_t>(len),tag_handler);
    }

    case0x9F://array(indefinitelength)
    returnget_cbor_array(std::size_t(-1),tag_handler);

    //map(0x00..0x17pairsofdataitemsfollow)
    case0xA0:
    case0xA1:
    case0xA2:
    case0xA3:
    case0xA4:
    case0xA5:
    case0xA6:
    case0xA7:
    case0xA8:
    case0xA9:
    case0xAA:
    case0xAB:
    case0xAC:
    case0xAD:
    case0xAE:
    case0xAF:
    case0xB0:
    case0xB1:
    case0xB2:
    case0xB3:
    case0xB4:
    case0xB5:
    case0xB6:
    case0xB7:
    returnget_cbor_object(static_cast<std::size_t>(static_cast<unsignedint>(current)&0x1Fu),tag_handler);

    case0xB8://map(one-byteuint8_tfornfollows)
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_object(static_cast<std::size_t>(len),tag_handler);
    }

    case0xB9://map(two-byteuint16_tfornfollow)
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_object(static_cast<std::size_t>(len),tag_handler);
    }

    case0xBA://map(four-byteuint32_tfornfollow)
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_object(static_cast<std::size_t>(len),tag_handler);
    }

    case0xBB://map(eight-byteuint64_tfornfollow)
    {
    std::uint64_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_cbor_object(static_cast<std::size_t>(len),tag_handler);
    }

    case0xBF://map(indefinitelength)
    returnget_cbor_object(std::size_t(-1),tag_handler);

    case0xC6://taggeditem
    case0xC7:
    case0xC8:
    case0xC9:
    case0xCA:
    case0xCB:
    case0xCC:
    case0xCD:
    case0xCE:
    case0xCF:
    case0xD0:
    case0xD1:
    case0xD2:
    case0xD3:
    case0xD4:
    case0xD8://taggeditem(1bytesfollow)
    case0xD9://taggeditem(2bytesfollow)
    case0xDA://taggeditem(4bytesfollow)
    case0xDB://taggeditem(8bytesfollow)
    {
    switch(tag_handler)
    {
    casecbor_tag_handler_t::error:
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::cbor,"invalidbyte:0x"+last_token,"value"),BasicJsonType()));
    }

    casecbor_tag_handler_t::ignore:
    {
    switch(current)
    {
    case0xD8:
    {
    std::uint8_tlen{};
    get_number(input_format_t::cbor,len);
    break;
    }
    case0xD9:
    {
    std::uint16_tlen{};
    get_number(input_format_t::cbor,len);
    break;
    }
    case0xDA:
    {
    std::uint32_tlen{};
    get_number(input_format_t::cbor,len);
    break;
    }
    case0xDB:
    {
    std::uint64_tlen{};
    get_number(input_format_t::cbor,len);
    break;
    }
    default:
    break;
    }
    returnparse_cbor_internal(true,tag_handler);
    }

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    returnfalse;//LCOV_EXCL_LINE
    }
    }

    case0xF4://false
    returnsax->boolean(false);

    case0xF5://true
    returnsax->boolean(true);

    case0xF6://null
    returnsax->null();

    case0xF9://Half-PrecisionFloat(two-byteIEEE754)
    {
    constautobyte1_raw=get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor,"number")))
    {
    returnfalse;
    }
    constautobyte2_raw=get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor,"number")))
    {
    returnfalse;
    }

    constautobyte1=static_cast<unsignedchar>(byte1_raw);
    constautobyte2=static_cast<unsignedchar>(byte2_raw);

    //codefromRFC7049,AppendixD,Figure3:
    //Ashalf-precisionfloating-pointnumberswereonlyadded
    //toIEEE754in2008,today'sprogrammingplatformsoften
    //stillonlyhavelimitedsupportforthem.Itisvery
    //easytoincludeatleastdecodingsupportforthemeven
    //withoutsuchsupport.Anexampleofasmalldecoderfor
    //half-precisionfloating-pointnumbersintheClanguage
    //isshowninFig.3.
    constautohalf=static_cast<unsignedint>((byte1<<8u)+byte2);
    constdoubleval=[&half]
    {
    constintexp=(half>>10u)&0x1Fu;
    constunsignedintmant=half&0x3FFu;
    JSON_ASSERT(0<=exp&&exp<=32);
    JSON_ASSERT(mant<=1024);
    switch(exp)
    {
    case0:
    returnstd::ldexp(mant,-24);
    case31:
    return(mant==0)
    ?std::numeric_limits<double>::infinity()
    :std::numeric_limits<double>::quiet_NaN();
    default:
    returnstd::ldexp(mant+1024,exp-25);
    }
    }();
    returnsax->number_float((half&0x8000u)!=0
    ?static_cast<number_float_t>(-val)
    :static_cast<number_float_t>(val),"");
    }

    case0xFA://Single-PrecisionFloat(four-byteIEEE754)
    {
    floatnumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case0xFB://Double-PrecisionFloat(eight-byteIEEE754)
    {
    doublenumber{};
    returnget_number(input_format_t::cbor,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    default://anythingelse(0xFFishandledinsidetheothertypes)
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::cbor,"invalidbyte:0x"+last_token,"value"),BasicJsonType()));
    }
    }
    }

    boolget_cbor_string(string_t&result)
    {
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor,"string")))
    {
    returnfalse;
    }

    switch(current)
    {
    //UTF-8string(0x00..0x17bytesfollow)
    case0x60:
    case0x61:
    case0x62:
    case0x63:
    case0x64:
    case0x65:
    case0x66:
    case0x67:
    case0x68:
    case0x69:
    case0x6A:
    case0x6B:
    case0x6C:
    case0x6D:
    case0x6E:
    case0x6F:
    case0x70:
    case0x71:
    case0x72:
    case0x73:
    case0x74:
    case0x75:
    case0x76:
    case0x77:
    {
    returnget_string(input_format_t::cbor,static_cast<unsignedint>(current)&0x1Fu,result);
    }

    case0x78://UTF-8string(one-byteuint8_tfornfollows)
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_string(input_format_t::cbor,len,result);
    }

    case0x79://UTF-8string(two-byteuint16_tfornfollow)
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_string(input_format_t::cbor,len,result);
    }

    case0x7A://UTF-8string(four-byteuint32_tfornfollow)
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_string(input_format_t::cbor,len,result);
    }

    case0x7B://UTF-8string(eight-byteuint64_tfornfollow)
    {
    std::uint64_tlen{};
    returnget_number(input_format_t::cbor,len)&&get_string(input_format_t::cbor,len,result);
    }

    case0x7F://UTF-8string(indefinitelength)
    {
    while(get()!=0xFF)
    {
    string_tchunk;
    if(!get_cbor_string(chunk))
    {
    returnfalse;
    }
    result.append(chunk);
    }
    returntrue;
    }

    default:
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expectedlengthspecification(0x60-0x7B)orindefinitestringtype(0x7F);lastbyte:0x"+last_token,"string"),BasicJsonType()));
    }
    }
    }

    boolget_cbor_binary(binary_t&result)
    {
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor,"binary")))
    {
    returnfalse;
    }

    switch(current)
    {
    //Binarydata(0x00..0x17bytesfollow)
    case0x40:
    case0x41:
    case0x42:
    case0x43:
    case0x44:
    case0x45:
    case0x46:
    case0x47:
    case0x48:
    case0x49:
    case0x4A:
    case0x4B:
    case0x4C:
    case0x4D:
    case0x4E:
    case0x4F:
    case0x50:
    case0x51:
    case0x52:
    case0x53:
    case0x54:
    case0x55:
    case0x56:
    case0x57:
    {
    returnget_binary(input_format_t::cbor,static_cast<unsignedint>(current)&0x1Fu,result);
    }

    case0x58://Binarydata(one-byteuint8_tfornfollows)
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::cbor,len)&&
    get_binary(input_format_t::cbor,len,result);
    }

    case0x59://Binarydata(two-byteuint16_tfornfollow)
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::cbor,len)&&
    get_binary(input_format_t::cbor,len,result);
    }

    case0x5A://Binarydata(four-byteuint32_tfornfollow)
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::cbor,len)&&
    get_binary(input_format_t::cbor,len,result);
    }

    case0x5B://Binarydata(eight-byteuint64_tfornfollow)
    {
    std::uint64_tlen{};
    returnget_number(input_format_t::cbor,len)&&
    get_binary(input_format_t::cbor,len,result);
    }

    case0x5F://Binarydata(indefinitelength)
    {
    while(get()!=0xFF)
    {
    binary_tchunk;
    if(!get_cbor_binary(chunk))
    {
    returnfalse;
    }
    result.insert(result.end(),chunk.begin(),chunk.end());
    }
    returntrue;
    }

    default:
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expectedlengthspecification(0x40-0x5B)orindefinitebinaryarraytype(0x5F);lastbyte:0x"+last_token,"binary"),BasicJsonType()));
    }
    }
    }

    boolget_cbor_array(conststd::size_tlen,
    constcbor_tag_handler_ttag_handler)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))
    {
    returnfalse;
    }

    if(len!=std::size_t(-1))
    {
    for(std::size_ti=0;i<len;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true,tag_handler)))
    {
    returnfalse;
    }
    }
    }
    else
    {
    while(get()!=0xFF)
    {
    if(JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false,tag_handler)))
    {
    returnfalse;
    }
    }
    }

    returnsax->end_array();
    }

    boolget_cbor_object(conststd::size_tlen,
    constcbor_tag_handler_ttag_handler)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))
    {
    returnfalse;
    }

    string_tkey;
    if(len!=std::size_t(-1))
    {
    for(std::size_ti=0;i<len;++i)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!get_cbor_string(key)||!sax->key(key)))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true,tag_handler)))
    {
    returnfalse;
    }
    key.clear();
    }
    }
    else
    {
    while(get()!=0xFF)
    {
    if(JSON_HEDLEY_UNLIKELY(!get_cbor_string(key)||!sax->key(key)))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true,tag_handler)))
    {
    returnfalse;
    }
    key.clear();
    }
    }

    returnsax->end_object();
    }

    //MsgPack//

    boolparse_msgpack_internal()
    {
    switch(get())
    {
    //EOF
    casestd::char_traits<char_type>::eof():
    returnunexpect_eof(input_format_t::msgpack,"value");

    //positivefixint
    case0x00:
    case0x01:
    case0x02:
    case0x03:
    case0x04:
    case0x05:
    case0x06:
    case0x07:
    case0x08:
    case0x09:
    case0x0A:
    case0x0B:
    case0x0C:
    case0x0D:
    case0x0E:
    case0x0F:
    case0x10:
    case0x11:
    case0x12:
    case0x13:
    case0x14:
    case0x15:
    case0x16:
    case0x17:
    case0x18:
    case0x19:
    case0x1A:
    case0x1B:
    case0x1C:
    case0x1D:
    case0x1E:
    case0x1F:
    case0x20:
    case0x21:
    case0x22:
    case0x23:
    case0x24:
    case0x25:
    case0x26:
    case0x27:
    case0x28:
    case0x29:
    case0x2A:
    case0x2B:
    case0x2C:
    case0x2D:
    case0x2E:
    case0x2F:
    case0x30:
    case0x31:
    case0x32:
    case0x33:
    case0x34:
    case0x35:
    case0x36:
    case0x37:
    case0x38:
    case0x39:
    case0x3A:
    case0x3B:
    case0x3C:
    case0x3D:
    case0x3E:
    case0x3F:
    case0x40:
    case0x41:
    case0x42:
    case0x43:
    case0x44:
    case0x45:
    case0x46:
    case0x47:
    case0x48:
    case0x49:
    case0x4A:
    case0x4B:
    case0x4C:
    case0x4D:
    case0x4E:
    case0x4F:
    case0x50:
    case0x51:
    case0x52:
    case0x53:
    case0x54:
    case0x55:
    case0x56:
    case0x57:
    case0x58:
    case0x59:
    case0x5A:
    case0x5B:
    case0x5C:
    case0x5D:
    case0x5E:
    case0x5F:
    case0x60:
    case0x61:
    case0x62:
    case0x63:
    case0x64:
    case0x65:
    case0x66:
    case0x67:
    case0x68:
    case0x69:
    case0x6A:
    case0x6B:
    case0x6C:
    case0x6D:
    case0x6E:
    case0x6F:
    case0x70:
    case0x71:
    case0x72:
    case0x73:
    case0x74:
    case0x75:
    case0x76:
    case0x77:
    case0x78:
    case0x79:
    case0x7A:
    case0x7B:
    case0x7C:
    case0x7D:
    case0x7E:
    case0x7F:
    returnsax->number_unsigned(static_cast<number_unsigned_t>(current));

    //fixmap
    case0x80:
    case0x81:
    case0x82:
    case0x83:
    case0x84:
    case0x85:
    case0x86:
    case0x87:
    case0x88:
    case0x89:
    case0x8A:
    case0x8B:
    case0x8C:
    case0x8D:
    case0x8E:
    case0x8F:
    returnget_msgpack_object(static_cast<std::size_t>(static_cast<unsignedint>(current)&0x0Fu));

    //fixarray
    case0x90:
    case0x91:
    case0x92:
    case0x93:
    case0x94:
    case0x95:
    case0x96:
    case0x97:
    case0x98:
    case0x99:
    case0x9A:
    case0x9B:
    case0x9C:
    case0x9D:
    case0x9E:
    case0x9F:
    returnget_msgpack_array(static_cast<std::size_t>(static_cast<unsignedint>(current)&0x0Fu));

    //fixstr
    case0xA0:
    case0xA1:
    case0xA2:
    case0xA3:
    case0xA4:
    case0xA5:
    case0xA6:
    case0xA7:
    case0xA8:
    case0xA9:
    case0xAA:
    case0xAB:
    case0xAC:
    case0xAD:
    case0xAE:
    case0xAF:
    case0xB0:
    case0xB1:
    case0xB2:
    case0xB3:
    case0xB4:
    case0xB5:
    case0xB6:
    case0xB7:
    case0xB8:
    case0xB9:
    case0xBA:
    case0xBB:
    case0xBC:
    case0xBD:
    case0xBE:
    case0xBF:
    case0xD9://str8
    case0xDA://str16
    case0xDB://str32
    {
    string_ts;
    returnget_msgpack_string(s)&&sax->string(s);
    }

    case0xC0://nil
    returnsax->null();

    case0xC2://false
    returnsax->boolean(false);

    case0xC3://true
    returnsax->boolean(true);

    case0xC4://bin8
    case0xC5://bin16
    case0xC6://bin32
    case0xC7://ext8
    case0xC8://ext16
    case0xC9://ext32
    case0xD4://fixext1
    case0xD5://fixext2
    case0xD6://fixext4
    case0xD7://fixext8
    case0xD8://fixext16
    {
    binary_tb;
    returnget_msgpack_binary(b)&&sax->binary(b);
    }

    case0xCA://float32
    {
    floatnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case0xCB://float64
    {
    doublenumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case0xCC://uint8
    {
    std::uint8_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_unsigned(number);
    }

    case0xCD://uint16
    {
    std::uint16_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_unsigned(number);
    }

    case0xCE://uint32
    {
    std::uint32_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_unsigned(number);
    }

    case0xCF://uint64
    {
    std::uint64_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_unsigned(number);
    }

    case0xD0://int8
    {
    std::int8_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_integer(number);
    }

    case0xD1://int16
    {
    std::int16_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_integer(number);
    }

    case0xD2://int32
    {
    std::int32_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_integer(number);
    }

    case0xD3://int64
    {
    std::int64_tnumber{};
    returnget_number(input_format_t::msgpack,number)&&sax->number_integer(number);
    }

    case0xDC://array16
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_msgpack_array(static_cast<std::size_t>(len));
    }

    case0xDD://array32
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_msgpack_array(static_cast<std::size_t>(len));
    }

    case0xDE://map16
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_msgpack_object(static_cast<std::size_t>(len));
    }

    case0xDF://map32
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_msgpack_object(static_cast<std::size_t>(len));
    }

    //negativefixint
    case0xE0:
    case0xE1:
    case0xE2:
    case0xE3:
    case0xE4:
    case0xE5:
    case0xE6:
    case0xE7:
    case0xE8:
    case0xE9:
    case0xEA:
    case0xEB:
    case0xEC:
    case0xED:
    case0xEE:
    case0xEF:
    case0xF0:
    case0xF1:
    case0xF2:
    case0xF3:
    case0xF4:
    case0xF5:
    case0xF6:
    case0xF7:
    case0xF8:
    case0xF9:
    case0xFA:
    case0xFB:
    case0xFC:
    case0xFD:
    case0xFE:
    case0xFF:
    returnsax->number_integer(static_cast<std::int8_t>(current));

    default://anythingelse
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::msgpack,"invalidbyte:0x"+last_token,"value"),BasicJsonType()));
    }
    }
    }

    boolget_msgpack_string(string_t&result)
    {
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::msgpack,"string")))
    {
    returnfalse;
    }

    switch(current)
    {
    //fixstr
    case0xA0:
    case0xA1:
    case0xA2:
    case0xA3:
    case0xA4:
    case0xA5:
    case0xA6:
    case0xA7:
    case0xA8:
    case0xA9:
    case0xAA:
    case0xAB:
    case0xAC:
    case0xAD:
    case0xAE:
    case0xAF:
    case0xB0:
    case0xB1:
    case0xB2:
    case0xB3:
    case0xB4:
    case0xB5:
    case0xB6:
    case0xB7:
    case0xB8:
    case0xB9:
    case0xBA:
    case0xBB:
    case0xBC:
    case0xBD:
    case0xBE:
    case0xBF:
    {
    returnget_string(input_format_t::msgpack,static_cast<unsignedint>(current)&0x1Fu,result);
    }

    case0xD9://str8
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_string(input_format_t::msgpack,len,result);
    }

    case0xDA://str16
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_string(input_format_t::msgpack,len,result);
    }

    case0xDB://str32
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::msgpack,len)&&get_string(input_format_t::msgpack,len,result);
    }

    default:
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::msgpack,"expectedlengthspecification(0xA0-0xBF,0xD9-0xDB);lastbyte:0x"+last_token,"string"),BasicJsonType()));
    }
    }
    }

    boolget_msgpack_binary(binary_t&result)
    {
    //helperfunctiontosetthesubtype
    autoassign_and_return_true=[&result](std::int8_tsubtype)
    {
    result.set_subtype(static_cast<std::uint8_t>(subtype));
    returntrue;
    };

    switch(current)
    {
    case0xC4://bin8
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::msgpack,len)&&
    get_binary(input_format_t::msgpack,len,result);
    }

    case0xC5://bin16
    {
    std::uint16_tlen{};
    returnget_number(input_format_t::msgpack,len)&&
    get_binary(input_format_t::msgpack,len,result);
    }

    case0xC6://bin32
    {
    std::uint32_tlen{};
    returnget_number(input_format_t::msgpack,len)&&
    get_binary(input_format_t::msgpack,len,result);
    }

    case0xC7://ext8
    {
    std::uint8_tlen{};
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,len)&&
    get_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,len,result)&&
    assign_and_return_true(subtype);
    }

    case0xC8://ext16
    {
    std::uint16_tlen{};
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,len)&&
    get_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,len,result)&&
    assign_and_return_true(subtype);
    }

    case0xC9://ext32
    {
    std::uint32_tlen{};
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,len)&&
    get_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,len,result)&&
    assign_and_return_true(subtype);
    }

    case0xD4://fixext1
    {
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,1,result)&&
    assign_and_return_true(subtype);
    }

    case0xD5://fixext2
    {
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,2,result)&&
    assign_and_return_true(subtype);
    }

    case0xD6://fixext4
    {
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,4,result)&&
    assign_and_return_true(subtype);
    }

    case0xD7://fixext8
    {
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,8,result)&&
    assign_and_return_true(subtype);
    }

    case0xD8://fixext16
    {
    std::int8_tsubtype{};
    returnget_number(input_format_t::msgpack,subtype)&&
    get_binary(input_format_t::msgpack,16,result)&&
    assign_and_return_true(subtype);
    }

    default://LCOV_EXCL_LINE
    returnfalse;//LCOV_EXCL_LINE
    }
    }

    boolget_msgpack_array(conststd::size_tlen)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))
    {
    returnfalse;
    }

    for(std::size_ti=0;i<len;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))
    {
    returnfalse;
    }
    }

    returnsax->end_array();
    }

    boolget_msgpack_object(conststd::size_tlen)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(len)))
    {
    returnfalse;
    }

    string_tkey;
    for(std::size_ti=0;i<len;++i)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key)||!sax->key(key)))
    {
    returnfalse;
    }

    if(JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal()))
    {
    returnfalse;
    }
    key.clear();
    }

    returnsax->end_object();
    }

    //UBJSON//

    boolparse_ubjson_internal(constboolget_char=true)
    {
    returnget_ubjson_value(get_char?get_ignore_noop():current);
    }

    boolget_ubjson_string(string_t&result,constboolget_char=true)
    {
    if(get_char)
    {
    get();//TODO(niels):mayweignoreNhere?
    }

    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson,"value")))
    {
    returnfalse;
    }

    switch(current)
    {
    case'U':
    {
    std::uint8_tlen{};
    returnget_number(input_format_t::ubjson,len)&&get_string(input_format_t::ubjson,len,result);
    }

    case'i':
    {
    std::int8_tlen{};
    returnget_number(input_format_t::ubjson,len)&&get_string(input_format_t::ubjson,len,result);
    }

    case'I':
    {
    std::int16_tlen{};
    returnget_number(input_format_t::ubjson,len)&&get_string(input_format_t::ubjson,len,result);
    }

    case'l':
    {
    std::int32_tlen{};
    returnget_number(input_format_t::ubjson,len)&&get_string(input_format_t::ubjson,len,result);
    }

    case'L':
    {
    std::int64_tlen{};
    returnget_number(input_format_t::ubjson,len)&&get_string(input_format_t::ubjson,len,result);
    }

    default:
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expectedlengthtypespecification(U,i,I,l,L);lastbyte:0x"+last_token,"string"),BasicJsonType()));
    }
    }

    boolget_ubjson_size_value(std::size_t&result)
    {
    switch(get_ignore_noop())
    {
    case'U':
    {
    std::uint8_tnumber{};
    if(JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson,number)))
    {
    returnfalse;
    }
    result=static_cast<std::size_t>(number);
    returntrue;
    }

    case'i':
    {
    std::int8_tnumber{};
    if(JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson,number)))
    {
    returnfalse;
    }
    result=static_cast<std::size_t>(number);//NOLINT(bugprone-signed-char-misuse,cert-str34-c):numberisnotachar
    returntrue;
    }

    case'I':
    {
    std::int16_tnumber{};
    if(JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson,number)))
    {
    returnfalse;
    }
    result=static_cast<std::size_t>(number);
    returntrue;
    }

    case'l':
    {
    std::int32_tnumber{};
    if(JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson,number)))
    {
    returnfalse;
    }
    result=static_cast<std::size_t>(number);
    returntrue;
    }

    case'L':
    {
    std::int64_tnumber{};
    if(JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::ubjson,number)))
    {
    returnfalse;
    }
    result=static_cast<std::size_t>(number);
    returntrue;
    }

    default:
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expectedlengthtypespecification(U,i,I,l,L)after'#';lastbyte:0x"+last_token,"size"),BasicJsonType()));
    }
    }
    }

    boolget_ubjson_size_type(std::pair<std::size_t,char_int_type>&result)
    {
    result.first=string_t::npos;//size
    result.second=0;//type

    get_ignore_noop();

    if(current=='$')
    {
    result.second=get();//mustnotignore'N',because'N'maybethetype
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson,"type")))
    {
    returnfalse;
    }

    get_ignore_noop();
    if(JSON_HEDLEY_UNLIKELY(current!='#'))
    {
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson,"value")))
    {
    returnfalse;
    }
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::ubjson,"expected'#'aftertypeinformation;lastbyte:0x"+last_token,"size"),BasicJsonType()));
    }

    returnget_ubjson_size_value(result.first);
    }

    if(current=='#')
    {
    returnget_ubjson_size_value(result.first);
    }

    returntrue;
    }

    boolget_ubjson_value(constchar_int_typeprefix)
    {
    switch(prefix)
    {
    casestd::char_traits<char_type>::eof()://EOF
    returnunexpect_eof(input_format_t::ubjson,"value");

    case'T'://true
    returnsax->boolean(true);
    case'F'://false
    returnsax->boolean(false);

    case'Z'://null
    returnsax->null();

    case'U':
    {
    std::uint8_tnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_unsigned(number);
    }

    case'i':
    {
    std::int8_tnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_integer(number);
    }

    case'I':
    {
    std::int16_tnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_integer(number);
    }

    case'l':
    {
    std::int32_tnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_integer(number);
    }

    case'L':
    {
    std::int64_tnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_integer(number);
    }

    case'd':
    {
    floatnumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case'D':
    {
    doublenumber{};
    returnget_number(input_format_t::ubjson,number)&&sax->number_float(static_cast<number_float_t>(number),"");
    }

    case'H':
    {
    returnget_ubjson_high_precision_number();
    }

    case'C'://char
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson,"char")))
    {
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(current>127))
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"byteafter'C'mustbeinrange0x00..0x7F;lastbyte:0x"+last_token,"char"),BasicJsonType()));
    }
    string_ts(1,static_cast<typenamestring_t::value_type>(current));
    returnsax->string(s);
    }

    case'S'://string
    {
    string_ts;
    returnget_ubjson_string(s)&&sax->string(s);
    }

    case'['://array
    returnget_ubjson_array();

    case'{'://object
    returnget_ubjson_object();

    default://anythingelse
    {
    autolast_token=get_token_string();
    returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::ubjson,"invalidbyte:0x"+last_token,"value"),BasicJsonType()));
    }
    }
    }

    boolget_ubjson_array()
    {
    std::pair<std::size_t,char_int_type>size_and_type;
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type)))
    {
    returnfalse;
    }

    if(size_and_type.first!=string_t::npos)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first)))
    {
    returnfalse;
    }

    if(size_and_type.second!=0)
    {
    if(size_and_type.second!='N')
    {
    for(std::size_ti=0;i<size_and_type.first;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second)))
    {
    returnfalse;
    }
    }
    }
    }
    else
    {
    for(std::size_ti=0;i<size_and_type.first;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))
    {
    returnfalse;
    }
    }
    }
    }
    else
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1))))
    {
    returnfalse;
    }

    while(current!=']')
    {
    if(JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false)))
    {
    returnfalse;
    }
    get_ignore_noop();
    }
    }

    returnsax->end_array();
    }

    boolget_ubjson_object()
    {
    std::pair<std::size_t,char_int_type>size_and_type;
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type)))
    {
    returnfalse;
    }

    string_tkey;
    if(size_and_type.first!=string_t::npos)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(size_and_type.first)))
    {
    returnfalse;
    }

    if(size_and_type.second!=0)
    {
    for(std::size_ti=0;i<size_and_type.first;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key)||!sax->key(key)))
    {
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second)))
    {
    returnfalse;
    }
    key.clear();
    }
    }
    else
    {
    for(std::size_ti=0;i<size_and_type.first;++i)
    {
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key)||!sax->key(key)))
    {
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))
    {
    returnfalse;
    }
    key.clear();
    }
    }
    }
    else
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1))))
    {
    returnfalse;
    }

    while(current!='}')
    {
    if(JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key,false)||!sax->key(key)))
    {
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal()))
    {
    returnfalse;
    }
    get_ignore_noop();
    key.clear();
    }
    }

    returnsax->end_object();
    }

    //Note,noreaderforUBJSONbinarytypesisimplementedbecausetheydo
    //notexist

    boolget_ubjson_high_precision_number()
    {
    //getsizeoffollowingnumberstring
    std::size_tsize{};
    autores=get_ubjson_size_value(size);
    if(JSON_HEDLEY_UNLIKELY(!res))
    {
    returnres;
    }

    //getnumberstring
    std::vector<char>number_vector;
    for(std::size_ti=0;i<size;++i)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson,"number")))
    {
    returnfalse;
    }
    number_vector.push_back(static_cast<char>(current));
    }

    //parsenumberstring
    usingia_type=decltype(detail::input_adapter(number_vector));
    autonumber_lexer=detail::lexer<BasicJsonType, ia_type>(detail::input_adapter(number_vector),false);
    constautoresult_number=number_lexer.scan();
    constautonumber_string=number_lexer.get_token_string();
    constautoresult_remainder=number_lexer.scan();

    usingtoken_type=typenamedetail::lexer_base<BasicJsonType>::token_type;

    if(JSON_HEDLEY_UNLIKELY(result_remainder!=token_type::end_of_input))
    {
    returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalidnumbertext:"+number_lexer.get_token_string(),"high-precisionnumber"),BasicJsonType()));
    }

    switch(result_number)
    {
    casetoken_type::value_integer:
    returnsax->number_integer(number_lexer.get_number_integer());
    casetoken_type::value_unsigned:
    returnsax->number_unsigned(number_lexer.get_number_unsigned());
    casetoken_type::value_float:
    returnsax->number_float(number_lexer.get_number_float(),std::move(number_string));
    default:
    returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalidnumbertext:"+number_lexer.get_token_string(),"high-precisionnumber"),BasicJsonType()));
    }
    }

    //Utilityfunctions//

    char_int_typeget()
    {
    ++chars_read;
    returncurrent=ia.get_character();
    }

    char_int_typeget_ignore_noop()
    {
    do
    {
    get();
    }
    while(current=='N');

    returncurrent;
    }

    /*
    @briefreadanumberfromtheinput

    @tparamNumberTypethetypeofthenumber
    @param[in]formatthecurrentformat(fordiagnostics)
    @param[out]resultnumberoftype@aNumberType

    @returnwhetherconversioncompleted

    @noteThisfunctionneedstorespectthesystem'sendianess,because
    bytesinCBOR,MessagePack,andUBJSONarestoredinnetworkorder
    (bigendian)andthereforeneedreorderingonlittleendiansystems.
    */
    template<typenameNumberType,boolInputIsLittleEndian=false>
    boolget_number(constinput_format_tformat,NumberType&result)
    {
    //step1:readinputintoarraywithsystem'sbyteorder
    std::array<std::uint8_t,sizeof(NumberType)>vec{};
    for(std::size_ti=0;i<sizeof(NumberType);++i)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(format,"number")))
    {
    returnfalse;
    }

    //reversebyteorderpriortoconversionifnecessary
    if(is_little_endian!=InputIsLittleEndian)
    {
    vec[sizeof(NumberType)-i-1]=static_cast<std::uint8_t>(current);
    }
    else
    {
    vec[i]=static_cast<std::uint8_t>(current);//LCOV_EXCL_LINE
    }
    }

    //step2:convertarrayintonumberoftypeTandreturn
    std::memcpy(&result,vec.data(),sizeof(NumberType));
    returntrue;
    }

    template<typenameNumberType>
    boolget_string(constinput_format_tformat,
    constNumberTypelen,
    string_t&result)
    {
    boolsuccess=true;
    for(NumberTypei=0;i<len;i++)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(format,"string")))
    {
    success=false;
    break;
    }
    result.push_back(static_cast<typenamestring_t::value_type>(current));
    }
    returnsuccess;
    }

    template<typenameNumberType>
    boolget_binary(constinput_format_tformat,
    constNumberTypelen,
    binary_t&result)
    {
    boolsuccess=true;
    for(NumberTypei=0;i<len;i++)
    {
    get();
    if(JSON_HEDLEY_UNLIKELY(!unexpect_eof(format,"binary")))
    {
    success=false;
    break;
    }
    result.push_back(static_cast<std::uint8_t>(current));
    }
    returnsuccess;
    }

    JSON_HEDLEY_NON_NULL(3)
    boolunexpect_eof(constinput_format_tformat,constchar*context)const
    {
    if(JSON_HEDLEY_UNLIKELY(current==std::char_traits<char_type>::eof()))
    {
    returnsax->parse_error(chars_read,"<endoffile>",
    parse_error::create(110,chars_read,exception_message(format,"unexpectedendofinput",context),BasicJsonType()));
    }
    returntrue;
    }

    std::stringget_token_string()const
    {
    std::array<char,3>cr{{}};
    (std::snprintf)(cr.data(),cr.size(),"%.2hhX",static_cast<unsignedchar>(current));//NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    returnstd::string{cr.data()};
    }

    std::stringexception_message(constinput_format_tformat,
    conststd::string&detail,
    conststd::string&context)const
    {
    std::stringerror_msg="syntaxerrorwhileparsing";

    switch(format)
    {
    caseinput_format_t::cbor:
    error_msg+="CBOR";
    break;

    caseinput_format_t::msgpack:
    error_msg+="MessagePack";
    break;

    caseinput_format_t::ubjson:
    error_msg+="UBJSON";
    break;

    caseinput_format_t::bson:
    error_msg+="BSON";
    break;

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }

    returnerror_msg+""+context+":"+detail;
    }

    private:
    InputAdapterTypeia;

    char_int_typecurrent=std::char_traits<char_type>::eof();

    std::size_tchars_read=0;

    constboolis_little_endian=little_endianess();

    json_sax_t*sax=nullptr;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/input/input_adapters.hpp>

    //#include<nlohmann/detail/input/lexer.hpp>

    //#include<nlohmann/detail/input/parser.hpp>

    #include<cmath>//isfinite
    #include<cstdint>//uint8_t
    #include<functional>//function
    #include<string>//string
    #include<utility>//move
    #include<vector>//vector

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/input/input_adapters.hpp>

    //#include<nlohmann/detail/input/json_sax.hpp>

    //#include<nlohmann/detail/input/lexer.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/is_sax.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //parser//

    enumclassparse_event_t:uint8_t
    {
    object_start,
    object_end,
    array_start,
    array_end,
    key,
    value
    };

    template<typenameBasicJsonType>
    usingparser_callback_t=
    std::function<bool(int/*depth*/,parse_event_t/*event*/,BasicJsonType&/*parsed*/)>;

    template<typenameBasicJsonType,typenameInputAdapterType>
    classparser
    {
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingstring_t=typenameBasicJsonType::string_t;
    usinglexer_t=lexer<BasicJsonType, InputAdapterType>;
    usingtoken_type=typenamelexer_t::token_type;

    public:
    explicitparser(InputAdapterType&&adapter,
    constparser_callback_t<BasicJsonType>cb=nullptr,
    constboolallow_exceptions_=true,
    constboolskip_comments=false)
    :callback(cb)
    ,m_lexer(std::move(adapter),skip_comments)
    ,allow_exceptions(allow_exceptions_)
    {
    //readfirsttoken
    get_token();
    }

    voidparse(constboolstrict,BasicJsonType&result)
    {
    if(callback)
    {
    json_sax_dom_callback_parser<BasicJsonType>sdp(result,callback,allow_exceptions);
    sax_parse_internal(&sdp);

    //instrictmode,inputmustbecompletelyread
    if(strict&&(get_token()!=token_type::end_of_input))
    {
    sdp.parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),
    exception_message(token_type::end_of_input,"value"),BasicJsonType()));
    }

    //incaseofanerror,returndiscardedvalue
    if(sdp.is_errored())
    {
    result=value_t::discarded;
    return;
    }

    //settop-levelvaluetonullifitwasdiscardedbythecallback
    //function
    if(result.is_discarded())
    {
    result=nullptr;
    }
    }
    else
    {
    json_sax_dom_parser<BasicJsonType>sdp(result,allow_exceptions);
    sax_parse_internal(&sdp);

    //instrictmode,inputmustbecompletelyread
    if(strict&&(get_token()!=token_type::end_of_input))
    {
    sdp.parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::end_of_input,"value"),BasicJsonType()));
    }

    //incaseofanerror,returndiscardedvalue
    if(sdp.is_errored())
    {
    result=value_t::discarded;
    return;
    }
    }

    result.assert_invariant();
    }

    boolaccept(constboolstrict=true)
    {
    json_sax_acceptor<BasicJsonType>sax_acceptor;
    returnsax_parse(&sax_acceptor,strict);
    }

    template<typenameSAX>
    JSON_HEDLEY_NON_NULL(2)
    boolsax_parse(SAX*sax,constboolstrict=true)
    {
    (void)detail::is_sax_static_asserts<SAX, BasicJsonType>{};
    constboolresult=sax_parse_internal(sax);

    //strictmode:nextbytemustbeEOF
    if(result&&strict&&(get_token()!=token_type::end_of_input))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::end_of_input,"value"),BasicJsonType()));
    }

    returnresult;
    }

    private:
    template<typenameSAX>
    JSON_HEDLEY_NON_NULL(2)
    boolsax_parse_internal(SAX*sax)
    {
    //stacktorememberthehierarchyofstructuredvaluesweareparsing
    //true=array;false=object
    std::vector<bool>states;
    //valuetoavoidagoto(seecommentwheresettotrue)
    boolskip_to_state_evaluation=false;

    while(true)
    {
    if(!skip_to_state_evaluation)
    {
    //invariant:get_token()wascalledbeforeeachiteration
    switch(last_token)
    {
    casetoken_type::begin_object:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1))))
    {
    returnfalse;
    }

    //closing}->wearedone
    if(get_token()==token_type::end_object)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->end_object()))
    {
    returnfalse;
    }
    break;
    }

    //parsekey
    if(JSON_HEDLEY_UNLIKELY(last_token!=token_type::value_string))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::value_string,"objectkey"),BasicJsonType()));
    }
    if(JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))
    {
    returnfalse;
    }

    //parseseparator(:)
    if(JSON_HEDLEY_UNLIKELY(get_token()!=token_type::name_separator))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::name_separator,"objectseparator"),BasicJsonType()));
    }

    //rememberwearenowinsideanobject
    states.push_back(false);

    //parsevalues
    get_token();
    continue;
    }

    casetoken_type::begin_array:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1))))
    {
    returnfalse;
    }

    //closing]->wearedone
    if(get_token()==token_type::end_array)
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->end_array()))
    {
    returnfalse;
    }
    break;
    }

    //rememberwearenowinsideanarray
    states.push_back(true);

    //parsevalues(noneedtocallget_token)
    continue;
    }

    casetoken_type::value_float:
    {
    constautores=m_lexer.get_number_float();

    if(JSON_HEDLEY_UNLIKELY(!std::isfinite(res)))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    out_of_range::create(406,"numberoverflowparsing'"+m_lexer.get_token_string()+"'",BasicJsonType()));
    }

    if(JSON_HEDLEY_UNLIKELY(!sax->number_float(res,m_lexer.get_string())))
    {
    returnfalse;
    }

    break;
    }

    casetoken_type::literal_false:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->boolean(false)))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::literal_null:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->null()))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::literal_true:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->boolean(true)))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::value_integer:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer())))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::value_string:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string())))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::value_unsigned:
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned())))
    {
    returnfalse;
    }
    break;
    }

    casetoken_type::parse_error:
    {
    //using"uninitialized"toavoid"expected"message
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::uninitialized,"value"),BasicJsonType()));
    }

    default://thelasttokenwasunexpected
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::literal_or_value,"value"),BasicJsonType()));
    }
    }
    }
    else
    {
    skip_to_state_evaluation=false;
    }

    //wereachedthislineafterwesuccessfullyparsedavalue
    if(states.empty())
    {
    //emptystack:wereachedtheendofthehierarchy:done
    returntrue;
    }

    if(states.back())//array
    {
    //comma->nextvalue
    if(get_token()==token_type::value_separator)
    {
    //parseanewvalue
    get_token();
    continue;
    }

    //closing]
    if(JSON_HEDLEY_LIKELY(last_token==token_type::end_array))
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->end_array()))
    {
    returnfalse;
    }

    //Wearedonewiththisarray.Beforewecanparsea
    //newvalue,weneedtoevaluatethenewstatefirst.
    //Bysettingskip_to_state_evaluationtofalse,we
    //areeffectivelyjumpingtothebeginningofthisif.
    JSON_ASSERT(!states.empty());
    states.pop_back();
    skip_to_state_evaluation=true;
    continue;
    }

    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::end_array,"array"),BasicJsonType()));
    }

    //states.back()isfalse->object

    //comma->nextvalue
    if(get_token()==token_type::value_separator)
    {
    //parsekey
    if(JSON_HEDLEY_UNLIKELY(get_token()!=token_type::value_string))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::value_string,"objectkey"),BasicJsonType()));
    }

    if(JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))
    {
    returnfalse;
    }

    //parseseparator(:)
    if(JSON_HEDLEY_UNLIKELY(get_token()!=token_type::name_separator))
    {
    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::name_separator,"objectseparator"),BasicJsonType()));
    }

    //parsevalues
    get_token();
    continue;
    }

    //closing}
    if(JSON_HEDLEY_LIKELY(last_token==token_type::end_object))
    {
    if(JSON_HEDLEY_UNLIKELY(!sax->end_object()))
    {
    returnfalse;
    }

    //Wearedonewiththisobject.Beforewecanparsea
    //newvalue,weneedtoevaluatethenewstatefirst.
    //Bysettingskip_to_state_evaluationtofalse,we
    //areeffectivelyjumpingtothebeginningofthisif.
    JSON_ASSERT(!states.empty());
    states.pop_back();
    skip_to_state_evaluation=true;
    continue;
    }

    returnsax->parse_error(m_lexer.get_position(),
    m_lexer.get_token_string(),
    parse_error::create(101,m_lexer.get_position(),exception_message(token_type::end_object,"object"),BasicJsonType()));
    }
    }

    token_typeget_token()
    {
    returnlast_token=m_lexer.scan();
    }

    std::stringexception_message(consttoken_typeexpected,conststd::string&context)
    {
    std::stringerror_msg="syntaxerror";

    if(!context.empty())
    {
    error_msg+="whileparsing"+context+"";
    }

    error_msg+="-";

    if(last_token==token_type::parse_error)
    {
    error_msg+=std::string(m_lexer.get_error_message())+";lastread:'"+
    m_lexer.get_token_string()+"'";
    }
    else
    {
    error_msg+="unexpected"+std::string(lexer_t::token_type_name(last_token));
    }

    if(expected!=token_type::uninitialized)
    {
    error_msg+=";expected"+std::string(lexer_t::token_type_name(expected));
    }

    returnerror_msg;
    }

    private:
    constparser_callback_t<BasicJsonType>callback=nullptr;
    token_typelast_token=token_type::uninitialized;
    lexer_tm_lexer;
    constboolallow_exceptions=true;
    };

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/iterators/internal_iterator.hpp>

    //#include<nlohmann/detail/iterators/primitive_iterator.hpp>

    #include<cstddef>//ptrdiff_t
    #include<limits>//numeric_limits

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    /*
    @briefaniteratorforprimitiveJSONtypes

    ThisclassmodelsaniteratorforprimitiveJSONtypes(boolean,number,
    string).It'sonlypurposeistoallowtheiterator/const_iteratorclasses
    to"iterate"overprimitivevalues.Internally,theiteratorismodeledby
    a`difference_type`variable.Valuebegin_value(`0`)modelsthebegin,
    end_value(`1`)modelspasttheend.
    */
    classprimitive_iterator_t
    {
    private:
    usingdifference_type=std::ptrdiff_t;
    staticconstexprdifference_typebegin_value=0;
    staticconstexprdifference_typeend_value=begin_value+1;

    JSON_PRIVATE_UNLESS_TESTED:
    difference_typem_it=(std::numeric_limits<std::ptrdiff_t>::min)();

    public:
    constexprdifference_typeget_value()constnoexcept
    {
    returnm_it;
    }

    voidset_begin()noexcept
    {
    m_it=begin_value;
    }

    voidset_end()noexcept
    {
    m_it=end_value;
    }

    constexprboolis_begin()constnoexcept
    {
    returnm_it==begin_value;
    }

    constexprboolis_end()constnoexcept
    {
    returnm_it==end_value;
    }

    friendconstexprbooloperator==(primitive_iterator_tlhs,primitive_iterator_trhs)noexcept
    {
    returnlhs.m_it==rhs.m_it;
    }

    friendconstexprbooloperator<(primitive_iterator_tlhs,primitive_iterator_trhs)noexcept
    {
    returnlhs.m_it<rhs.m_it;
    }

    primitive_iterator_toperator+(difference_typen)noexcept
    {
    autoresult=*this;
    result+=n;
    returnresult;
    }

    friendconstexprdifference_typeoperator-(primitive_iterator_tlhs,primitive_iterator_trhs)noexcept
    {
    returnlhs.m_it-rhs.m_it;
    }

    primitive_iterator_t&operator++()noexcept
    {
    ++m_it;
    return*this;
    }

    primitive_iterator_tconstoperator++(int)noexcept//NOLINT(readability-const-return-type)
    {
    autoresult=*this;
    ++m_it;
    returnresult;
    }

    primitive_iterator_t&operator--()noexcept
    {
    --m_it;
    return*this;
    }

    primitive_iterator_tconstoperator--(int)noexcept//NOLINT(readability-const-return-type)
    {
    autoresult=*this;
    --m_it;
    returnresult;
    }

    primitive_iterator_t&operator+=(difference_typen)noexcept
    {
    m_it+=n;
    return*this;
    }

    primitive_iterator_t&operator-=(difference_typen)noexcept
    {
    m_it-=n;
    return*this;
    }
    };
    }//namespacedetail
    }//namespacenlohmann

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameBasicJsonType>structinternal_iterator
    {
    typenameBasicJsonType::object_t::iteratorobject_iterator{};
    typenameBasicJsonType::array_t::iteratorarray_iterator{};
    primitive_iterator_tprimitive_iterator{};
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/iterators/iter_impl.hpp>

    #include<iterator>//iterator,random_access_iterator_tag,bidirectional_iterator_tag,advance,next
    #include<type_traits>//conditional,is_const,remove_const

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/iterators/internal_iterator.hpp>

    //#include<nlohmann/detail/iterators/primitive_iterator.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //forwarddeclare,tobeabletofrienditlateron
    template<typenameIteratorType>classiteration_proxy;
    template<typenameIteratorType>classiteration_proxy_value;

    template<typenameBasicJsonType>
    classiter_impl
    {
    usingother_iter_impl=iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value,typenamestd::remove_const<BasicJsonType>::type,constBasicJsonType>::type>;
    friendother_iter_impl;
    friendBasicJsonType;
    frienditeration_proxy<iter_impl>;
    frienditeration_proxy_value<iter_impl>;

    usingobject_t=typenameBasicJsonType::object_t;
    usingarray_t=typenameBasicJsonType::array_t;
    //makesureBasicJsonTypeisbasic_jsonorconstbasic_json
    static_assert(is_basic_json<typenamestd::remove_const<BasicJsonType>::type>::value,
    "iter_implonlyaccepts(const)basic_json");

    public:

    usingiterator_category=std::bidirectional_iterator_tag;

    usingvalue_type=typenameBasicJsonType::value_type;
    usingdifference_type=typenameBasicJsonType::difference_type;
    usingpointer=typenamestd::conditional<std::is_const<BasicJsonType>::value,
    typenameBasicJsonType::const_pointer,
    typenameBasicJsonType::pointer>::type;
    usingreference=
    typenamestd::conditional<std::is_const<BasicJsonType>::value,
    typenameBasicJsonType::const_reference,
    typenameBasicJsonType::reference>::type;

    iter_impl()=default;
    ~iter_impl()=default;
    iter_impl(iter_impl&&)noexcept=default;
    iter_impl&operator=(iter_impl&&)noexcept=default;

    explicititer_impl(pointerobject)noexcept:m_object(object)
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    m_it.object_iterator=typenameobject_t::iterator();
    break;
    }

    casevalue_t::array:
    {
    m_it.array_iterator=typenamearray_t::iterator();
    break;
    }

    default:
    {
    m_it.primitive_iterator=primitive_iterator_t();
    break;
    }
    }
    }

    iter_impl(constiter_impl<const BasicJsonType>&other)noexcept
    :m_object(other.m_object),m_it(other.m_it)
    {}

    iter_impl&operator=(constiter_impl<const BasicJsonType>&other)noexcept
    {
    if(&other!=this)
    {
    m_object=other.m_object;
    m_it=other.m_it;
    }
    return*this;
    }

    iter_impl(constiter_impl<typenamestd::remove_const<BasicJsonType>::type>&other)noexcept
    :m_object(other.m_object),m_it(other.m_it)
    {}

    iter_impl&operator=(constiter_impl<typenamestd::remove_const<BasicJsonType>::type>&other)noexcept//NOLINT(cert-oop54-cpp)
    {
    m_object=other.m_object;
    m_it=other.m_it;
    return*this;
    }

    JSON_PRIVATE_UNLESS_TESTED:
    voidset_begin()noexcept
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    m_it.object_iterator=m_object->m_value.object->begin();
    break;
    }

    casevalue_t::array:
    {
    m_it.array_iterator=m_object->m_value.array->begin();
    break;
    }

    casevalue_t::null:
    {
    //settoendsobegin()==end()istrue:nullisempty
    m_it.primitive_iterator.set_end();
    break;
    }

    default:
    {
    m_it.primitive_iterator.set_begin();
    break;
    }
    }
    }

    voidset_end()noexcept
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    m_it.object_iterator=m_object->m_value.object->end();
    break;
    }

    casevalue_t::array:
    {
    m_it.array_iterator=m_object->m_value.array->end();
    break;
    }

    default:
    {
    m_it.primitive_iterator.set_end();
    break;
    }
    }
    }

    public:
    referenceoperator*()const
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    JSON_ASSERT(m_it.object_iterator!=m_object->m_value.object->end());
    returnm_it.object_iterator->second;
    }

    casevalue_t::array:
    {
    JSON_ASSERT(m_it.array_iterator!=m_object->m_value.array->end());
    return*m_it.array_iterator;
    }

    casevalue_t::null:
    JSON_THROW(invalid_iterator::create(214,"cannotgetvalue",*m_object));

    default:
    {
    if(JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
    {
    return*m_object;
    }

    JSON_THROW(invalid_iterator::create(214,"cannotgetvalue",*m_object));
    }
    }
    }

    pointeroperator->()const
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    JSON_ASSERT(m_it.object_iterator!=m_object->m_value.object->end());
    return&(m_it.object_iterator->second);
    }

    casevalue_t::array:
    {
    JSON_ASSERT(m_it.array_iterator!=m_object->m_value.array->end());
    return&*m_it.array_iterator;
    }

    default:
    {
    if(JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
    {
    returnm_object;
    }

    JSON_THROW(invalid_iterator::create(214,"cannotgetvalue",*m_object));
    }
    }
    }

    iter_implconstoperator++(int)//NOLINT(readability-const-return-type)
    {
    autoresult=*this;
    ++(*this);
    returnresult;
    }

    iter_impl&operator++()
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    std::advance(m_it.object_iterator,1);
    break;
    }

    casevalue_t::array:
    {
    std::advance(m_it.array_iterator,1);
    break;
    }

    default:
    {
    ++m_it.primitive_iterator;
    break;
    }
    }

    return*this;
    }

    iter_implconstoperator--(int)//NOLINT(readability-const-return-type)
    {
    autoresult=*this;
    --(*this);
    returnresult;
    }

    iter_impl&operator--()
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    {
    std::advance(m_it.object_iterator,-1);
    break;
    }

    casevalue_t::array:
    {
    std::advance(m_it.array_iterator,-1);
    break;
    }

    default:
    {
    --m_it.primitive_iterator;
    break;
    }
    }

    return*this;
    }

    template<typenameIterImpl,detail::enable_if_t<(std::is_same<IterImpl,iter_impl>::value||std::is_same<IterImpl,other_iter_impl>::value),std::nullptr_t>=nullptr>
    booloperator==(constIterImpl&other)const
    {
    //ifobjectsarenotthesame,thecomparisonisundefined
    if(JSON_HEDLEY_UNLIKELY(m_object!=other.m_object))
    {
    JSON_THROW(invalid_iterator::create(212,"cannotcompareiteratorsofdifferentcontainers",*m_object));
    }

    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    return(m_it.object_iterator==other.m_it.object_iterator);

    casevalue_t::array:
    return(m_it.array_iterator==other.m_it.array_iterator);

    default:
    return(m_it.primitive_iterator==other.m_it.primitive_iterator);
    }
    }

    template<typenameIterImpl,detail::enable_if_t<(std::is_same<IterImpl,iter_impl>::value||std::is_same<IterImpl,other_iter_impl>::value),std::nullptr_t>=nullptr>
    booloperator!=(constIterImpl&other)const
    {
    return!operator==(other);
    }

    booloperator<(constiter_impl&other)const
    {
    //ifobjectsarenotthesame,thecomparisonisundefined
    if(JSON_HEDLEY_UNLIKELY(m_object!=other.m_object))
    {
    JSON_THROW(invalid_iterator::create(212,"cannotcompareiteratorsofdifferentcontainers",*m_object));
    }

    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    JSON_THROW(invalid_iterator::create(213,"cannotcompareorderofobjectiterators",*m_object));

    casevalue_t::array:
    return(m_it.array_iterator<other.m_it.array_iterator);

    default:
    return(m_it.primitive_iterator<other.m_it.primitive_iterator);
    }
    }

    booloperator<=(constiter_impl&other)const
    {
    return!other.operator<(*this);
    }

    booloperator>(constiter_impl&other)const
    {
    return!operator<=(other);
    }

    booloperator>=(constiter_impl&other)const
    {
    return!operator<(other);
    }

    iter_impl&operator+=(difference_typei)
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    JSON_THROW(invalid_iterator::create(209,"cannotuseoffsetswithobjectiterators",*m_object));

    casevalue_t::array:
    {
    std::advance(m_it.array_iterator,i);
    break;
    }

    default:
    {
    m_it.primitive_iterator+=i;
    break;
    }
    }

    return*this;
    }

    iter_impl&operator-=(difference_typei)
    {
    returnoperator+=(-i);
    }

    iter_imploperator+(difference_typei)const
    {
    autoresult=*this;
    result+=i;
    returnresult;
    }

    frienditer_imploperator+(difference_typei,constiter_impl&it)
    {
    autoresult=it;
    result+=i;
    returnresult;
    }

    iter_imploperator-(difference_typei)const
    {
    autoresult=*this;
    result-=i;
    returnresult;
    }

    difference_typeoperator-(constiter_impl&other)const
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    JSON_THROW(invalid_iterator::create(209,"cannotuseoffsetswithobjectiterators",*m_object));

    casevalue_t::array:
    returnm_it.array_iterator-other.m_it.array_iterator;

    default:
    returnm_it.primitive_iterator-other.m_it.primitive_iterator;
    }
    }

    referenceoperator[](difference_typen)const
    {
    JSON_ASSERT(m_object!=nullptr);

    switch(m_object->m_type)
    {
    casevalue_t::object:
    JSON_THROW(invalid_iterator::create(208,"cannotuseoperator[]forobjectiterators",*m_object));

    casevalue_t::array:
    return*std::next(m_it.array_iterator,n);

    casevalue_t::null:
    JSON_THROW(invalid_iterator::create(214,"cannotgetvalue",*m_object));

    default:
    {
    if(JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value()==-n))
    {
    return*m_object;
    }

    JSON_THROW(invalid_iterator::create(214,"cannotgetvalue",*m_object));
    }
    }
    }

    consttypenameobject_t::key_type&key()const
    {
    JSON_ASSERT(m_object!=nullptr);

    if(JSON_HEDLEY_LIKELY(m_object->is_object()))
    {
    returnm_it.object_iterator->first;
    }

    JSON_THROW(invalid_iterator::create(207,"cannotusekey()fornon-objectiterators",*m_object));
    }

    referencevalue()const
    {
    returnoperator*();
    }

    JSON_PRIVATE_UNLESS_TESTED:
    pointerm_object=nullptr;
    internal_iterator<typename std::remove_const<BasicJsonType>::type>m_it{};
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/iterators/iteration_proxy.hpp>

    //#include<nlohmann/detail/iterators/json_reverse_iterator.hpp>

    #include<cstddef>//ptrdiff_t
    #include<iterator>//reverse_iterator
    #include<utility>//declval

    namespacenlohmann
    {
    namespacedetail
    {
    //reverse_iterator//

    template<typenameBase>
    classjson_reverse_iterator:publicstd::reverse_iterator<Base>
    {
    public:
    usingdifference_type=std::ptrdiff_t;
    usingbase_iterator=std::reverse_iterator<Base>;
    usingreference=typenameBase::reference;

    explicitjson_reverse_iterator(consttypenamebase_iterator::iterator_type&it)noexcept
    :base_iterator(it){}

    explicitjson_reverse_iterator(constbase_iterator&it)noexcept:base_iterator(it){}

    json_reverse_iteratorconstoperator++(int)//NOLINT(readability-const-return-type)
    {
    returnstatic_cast<json_reverse_iterator>(base_iterator::operator++(1));
    }

    json_reverse_iterator&operator++()
    {
    returnstatic_cast<json_reverse_iterator&>(base_iterator::operator++());
    }

    json_reverse_iteratorconstoperator--(int)//NOLINT(readability-const-return-type)
    {
    returnstatic_cast<json_reverse_iterator>(base_iterator::operator--(1));
    }

    json_reverse_iterator&operator--()
    {
    returnstatic_cast<json_reverse_iterator&>(base_iterator::operator--());
    }

    json_reverse_iterator&operator+=(difference_typei)
    {
    returnstatic_cast<json_reverse_iterator&>(base_iterator::operator+=(i));
    }

    json_reverse_iteratoroperator+(difference_typei)const
    {
    returnstatic_cast<json_reverse_iterator>(base_iterator::operator+(i));
    }

    json_reverse_iteratoroperator-(difference_typei)const
    {
    returnstatic_cast<json_reverse_iterator>(base_iterator::operator-(i));
    }

    difference_typeoperator-(constjson_reverse_iterator&other)const
    {
    returnbase_iterator(*this)-base_iterator(other);
    }

    referenceoperator[](difference_typen)const
    {
    return*(this->operator+(n));
    }

    autokey()const->decltype(std::declval<Base>().key())
    {
    autoit=--this->base();
    returnit.key();
    }

    referencevalue()const
    {
    autoit=--this->base();
    returnit.operator*();
    }
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/iterators/primitive_iterator.hpp>

    //#include<nlohmann/detail/json_pointer.hpp>

    #include<algorithm>//all_of
    #include<cctype>//isdigit
    #include<limits>//max
    #include<numeric>//accumulate
    #include<string>//string
    #include<utility>//move
    #include<vector>//vector

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/string_escape.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    template<typenameBasicJsonType>
    classjson_pointer
    {
    //allowbasic_jsontoaccessprivatemembers
    NLOHMANN_BASIC_JSON_TPL_DECLARATION
    friendclassbasic_json;

    public:
    explicitjson_pointer(conststd::string&s="")
    :reference_tokens(split(s))
    {}

    std::stringto_string()const
    {
    returnstd::accumulate(reference_tokens.begin(),reference_tokens.end(),
    std::string{},
    [](conststd::string&a,conststd::string&b)
    {
    returna+"/"+detail::escape(b);
    });
    }

    operatorstd::string()const
    {
    returnto_string();
    }

    json_pointer&operator/=(constjson_pointer&ptr)
    {
    reference_tokens.insert(reference_tokens.end(),
    ptr.reference_tokens.begin(),
    ptr.reference_tokens.end());
    return*this;
    }

    json_pointer&operator/=(std::stringtoken)
    {
    push_back(std::move(token));
    return*this;
    }

    json_pointer&operator/=(std::size_tarray_idx)
    {
    return*this/=std::to_string(array_idx);
    }

    friendjson_pointeroperator/(constjson_pointer&lhs,
    constjson_pointer&rhs)
    {
    returnjson_pointer(lhs)/=rhs;
    }

    friendjson_pointeroperator/(constjson_pointer&ptr,std::stringtoken)//NOLINT(performance-unnecessary-value-param)
    {
    returnjson_pointer(ptr)/=std::move(token);
    }

    friendjson_pointeroperator/(constjson_pointer&ptr,std::size_tarray_idx)
    {
    returnjson_pointer(ptr)/=array_idx;
    }

    json_pointerparent_pointer()const
    {
    if(empty())
    {
    return*this;
    }

    json_pointerres=*this;
    res.pop_back();
    returnres;
    }

    voidpop_back()
    {
    if(JSON_HEDLEY_UNLIKELY(empty()))
    {
    JSON_THROW(detail::out_of_range::create(405,"JSONpointerhasnoparent",BasicJsonType()));
    }

    reference_tokens.pop_back();
    }

    conststd::string&back()const
    {
    if(JSON_HEDLEY_UNLIKELY(empty()))
    {
    JSON_THROW(detail::out_of_range::create(405,"JSONpointerhasnoparent",BasicJsonType()));
    }

    returnreference_tokens.back();
    }

    voidpush_back(conststd::string&token)
    {
    reference_tokens.push_back(token);
    }

    voidpush_back(std::string&&token)
    {
    reference_tokens.push_back(std::move(token));
    }

    boolempty()constnoexcept
    {
    returnreference_tokens.empty();
    }

    private:
    statictypenameBasicJsonType::size_typearray_index(conststd::string&s)
    {
    usingsize_type=typenameBasicJsonType::size_type;

    //errorcondition(cf.RFC6901,Sect.4)
    if(JSON_HEDLEY_UNLIKELY(s.size()>1&&s[0]=='0'))
    {
    JSON_THROW(detail::parse_error::create(106,0,"arrayindex'"+s+"'mustnotbeginwith'0'",BasicJsonType()));
    }

    //errorcondition(cf.RFC6901,Sect.4)
    if(JSON_HEDLEY_UNLIKELY(s.size()>1&&!(s[0]>='1'&&s[0]<='9')))
    {
    JSON_THROW(detail::parse_error::create(109,0,"arrayindex'"+s+"'isnotanumber",BasicJsonType()));
    }

    std::size_tprocessed_chars=0;
    unsignedlonglongres=0;//NOLINT(runtime/int)
    JSON_TRY
    {
    res=std::stoull(s,&processed_chars);
    }
    JSON_CATCH(std::out_of_range&)
    {
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+s+"'",BasicJsonType()));
    }

    //checkifthestringwascompletelyread
    if(JSON_HEDLEY_UNLIKELY(processed_chars!=s.size()))
    {
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+s+"'",BasicJsonType()));
    }

    //onlytriggeredonspecialplatforms(like32bit),seealso
    //https://github.com/nlohmann/json/pull/2203
    if(res>=static_cast<unsignedlonglong>((std::numeric_limits<size_type>::max)()))//NOLINT(runtime/int)
    {
    JSON_THROW(detail::out_of_range::create(410,"arrayindex"+s+"exceedssize_type",BasicJsonType()));//LCOV_EXCL_LINE
    }

    returnstatic_cast<size_type>(res);
    }

    JSON_PRIVATE_UNLESS_TESTED:
    json_pointertop()const
    {
    if(JSON_HEDLEY_UNLIKELY(empty()))
    {
    JSON_THROW(detail::out_of_range::create(405,"JSONpointerhasnoparent",BasicJsonType()));
    }

    json_pointerresult=*this;
    result.reference_tokens={reference_tokens[0]};
    returnresult;
    }

    private:
    BasicJsonType&get_and_create(BasicJsonType&j)const
    {
    auto*result=&j;

    //incasenoreferencetokensexist,returnareferencetotheJSONvalue
    //jwhichwillbeoverwrittenbyaprimitivevalue
    for(constauto&reference_token:reference_tokens)
    {
    switch(result->type())
    {
    casedetail::value_t::null:
    {
    if(reference_token=="0")
    {
    //startanewarrayifreferencetokenis0
    result=&result->operator[](0);
    }
    else
    {
    //startanewobjectotherwise
    result=&result->operator[](reference_token);
    }
    break;
    }

    casedetail::value_t::object:
    {
    //createanentryintheobject
    result=&result->operator[](reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    //createanentryinthearray
    result=&result->operator[](array_index(reference_token));
    break;
    }

    /*
    Thefollowingcodeisonlyreachedifthereexistsareference
    token_and_thecurrentvalueisprimitive.Inthiscase,wehave
    anerrorsituation,becauseprimitivevaluesmayonlyoccuras
    singlevalue;thatis,withanemptylistofreferencetokens.
    */
    default:
    JSON_THROW(detail::type_error::create(313,"invalidvaluetounflatten",j));
    }
    }

    return*result;
    }

    BasicJsonType&get_unchecked(BasicJsonType*ptr)const
    {
    for(constauto&reference_token:reference_tokens)
    {
    //convertnullvaluestoarraysorobjectsbeforecontinuing
    if(ptr->is_null())
    {
    //checkifreferencetokenisanumber
    constboolnums=
    std::all_of(reference_token.begin(),reference_token.end(),
    [](constunsignedcharx)
    {
    returnstd::isdigit(x);
    });

    //changevaluetoarrayfornumbersor"-"ortoobjectotherwise
    *ptr=(nums||reference_token=="-")
    ?detail::value_t::array
    :detail::value_t::object;
    }

    switch(ptr->type())
    {
    casedetail::value_t::object:
    {
    //useuncheckedobjectaccess
    ptr=&ptr->operator[](reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    if(reference_token=="-")
    {
    //explicitlytreat"-"asindexbeyondtheend
    ptr=&ptr->operator[](ptr->m_value.array->size());
    }
    else
    {
    //convertarrayindextonumber;uncheckedaccess
    ptr=&ptr->operator[](array_index(reference_token));
    }
    break;
    }

    default:
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+reference_token+"'",*ptr));
    }
    }

    return*ptr;
    }

    BasicJsonType&get_checked(BasicJsonType*ptr)const
    {
    for(constauto&reference_token:reference_tokens)
    {
    switch(ptr->type())
    {
    casedetail::value_t::object:
    {
    //note:atperformsrangecheck
    ptr=&ptr->at(reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    if(JSON_HEDLEY_UNLIKELY(reference_token=="-"))
    {
    //"-"alwaysfailstherangecheck
    JSON_THROW(detail::out_of_range::create(402,
    "arrayindex'-'("+std::to_string(ptr->m_value.array->size())+
    ")isoutofrange",*ptr));
    }

    //note:atperformsrangecheck
    ptr=&ptr->at(array_index(reference_token));
    break;
    }

    default:
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+reference_token+"'",*ptr));
    }
    }

    return*ptr;
    }

    constBasicJsonType&get_unchecked(constBasicJsonType*ptr)const
    {
    for(constauto&reference_token:reference_tokens)
    {
    switch(ptr->type())
    {
    casedetail::value_t::object:
    {
    //useuncheckedobjectaccess
    ptr=&ptr->operator[](reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    if(JSON_HEDLEY_UNLIKELY(reference_token=="-"))
    {
    //"-"cannotbeusedforconstaccess
    JSON_THROW(detail::out_of_range::create(402,"arrayindex'-'("+std::to_string(ptr->m_value.array->size())+")isoutofrange",*ptr));
    }

    //useuncheckedarrayaccess
    ptr=&ptr->operator[](array_index(reference_token));
    break;
    }

    default:
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+reference_token+"'",*ptr));
    }
    }

    return*ptr;
    }

    constBasicJsonType&get_checked(constBasicJsonType*ptr)const
    {
    for(constauto&reference_token:reference_tokens)
    {
    switch(ptr->type())
    {
    casedetail::value_t::object:
    {
    //note:atperformsrangecheck
    ptr=&ptr->at(reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    if(JSON_HEDLEY_UNLIKELY(reference_token=="-"))
    {
    //"-"alwaysfailstherangecheck
    JSON_THROW(detail::out_of_range::create(402,
    "arrayindex'-'("+std::to_string(ptr->m_value.array->size())+
    ")isoutofrange",*ptr));
    }

    //note:atperformsrangecheck
    ptr=&ptr->at(array_index(reference_token));
    break;
    }

    default:
    JSON_THROW(detail::out_of_range::create(404,"unresolvedreferencetoken'"+reference_token+"'",*ptr));
    }
    }

    return*ptr;
    }

    boolcontains(constBasicJsonType*ptr)const
    {
    for(constauto&reference_token:reference_tokens)
    {
    switch(ptr->type())
    {
    casedetail::value_t::object:
    {
    if(!ptr->contains(reference_token))
    {
    //wedidnotfindthekeyintheobject
    returnfalse;
    }

    ptr=&ptr->operator[](reference_token);
    break;
    }

    casedetail::value_t::array:
    {
    if(JSON_HEDLEY_UNLIKELY(reference_token=="-"))
    {
    //"-"alwaysfailstherangecheck
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(reference_token.size()==1&&!("0"<=reference_token&&reference_token<="9")))
    {
    //invalidchar
    returnfalse;
    }
    if(JSON_HEDLEY_UNLIKELY(reference_token.size()>1))
    {
    if(JSON_HEDLEY_UNLIKELY(!('1'<=reference_token[0]&&reference_token[0]<='9')))
    {
    //firstcharshouldbebetween'1'and'9'
    returnfalse;
    }
    for(std::size_ti=1;i<reference_token.size();i++)
    {
    if(JSON_HEDLEY_UNLIKELY(!('0'<=reference_token[i]&&reference_token[i]<='9')))
    {
    //othercharshouldbebetween'0'and'9'
    returnfalse;
    }
    }
    }

    constautoidx=array_index(reference_token);
    if(idx>=ptr->size())
    {
    //indexoutofrange
    returnfalse;
    }

    ptr=&ptr->operator[](idx);
    break;
    }

    default:
    {
    //wedonotexpectprimitivevaluesifthereisstilla
    //referencetokentoprocess
    returnfalse;
    }
    }
    }

    //noreferencetokenleftmeanswefoundaprimitivevalue
    returntrue;
    }

    staticstd::vector<std::string>split(conststd::string&reference_string)
    {
    std::vector<std::string>result;

    //specialcase:emptyreferencestring->noreferencetokens
    if(reference_string.empty())
    {
    returnresult;
    }

    //checkifnonemptyreferencestringbeginswithslash
    if(JSON_HEDLEY_UNLIKELY(reference_string[0]!='/'))
    {
    JSON_THROW(detail::parse_error::create(107,1,"JSONpointermustbeemptyorbeginwith'/'-was:'"+reference_string+"'",BasicJsonType()));
    }

    //extractthereferencetokens:
    //-slash:positionofthelastreadslash(orendofstring)
    //-start:positionafterthepreviousslash
    for(
    //searchforthefirstslashafterthefirstcharacter
    std::size_tslash=reference_string.find_first_of('/',1),
    //setthebeginningofthefirstreferencetoken
    start=1;
    //wecanstopifstart==0(ifslash==std::string::npos)
    start!=0;
    //setthebeginningofthenextreferencetoken
    //(willeventuallybe0ifslash==std::string::npos)
    start=(slash==std::string::npos)?0:slash+1,
    //findnextslash
    slash=reference_string.find_first_of('/',start))
    {
    //usethetextbetweenthebeginningofthereferencetoken
    //(start)andthelastslash(slash).
    autoreference_token=reference_string.substr(start,slash-start);

    //checkreferencetokensareproperlyescaped
    for(std::size_tpos=reference_token.find_first_of('~');
    pos!=std::string::npos;
    pos=reference_token.find_first_of('~',pos+1))
    {
    JSON_ASSERT(reference_token[pos]=='~');

    //~mustbefollowedby0or1
    if(JSON_HEDLEY_UNLIKELY(pos==reference_token.size()-1||
    (reference_token[pos+1]!='0'&&
    reference_token[pos+1]!='1')))
    {
    JSON_THROW(detail::parse_error::create(108,0,"escapecharacter'~'mustbefollowedwith'0'or'1'",BasicJsonType()));
    }
    }

    //finally,storethereferencetoken
    detail::unescape(reference_token);
    result.push_back(reference_token);
    }

    returnresult;
    }

    private:
    staticvoidflatten(conststd::string&reference_string,
    constBasicJsonType&value,
    BasicJsonType&result)
    {
    switch(value.type())
    {
    casedetail::value_t::array:
    {
    if(value.m_value.array->empty())
    {
    //flattenemptyarrayasnull
    result[reference_string]=nullptr;
    }
    else
    {
    //iteratearrayanduseindexasreferencestring
    for(std::size_ti=0;i<value.m_value.array->size();++i)
    {
    flatten(reference_string+"/"+std::to_string(i),
    value.m_value.array->operator[](i),result);
    }
    }
    break;
    }

    casedetail::value_t::object:
    {
    if(value.m_value.object->empty())
    {
    //flattenemptyobjectasnull
    result[reference_string]=nullptr;
    }
    else
    {
    //iterateobjectandusekeysasreferencestring
    for(constauto&element:*value.m_value.object)
    {
    flatten(reference_string+"/"+detail::escape(element.first),element.second,result);
    }
    }
    break;
    }

    default:
    {
    //addprimitivevaluewithitsreferencestring
    result[reference_string]=value;
    break;
    }
    }
    }

    staticBasicJsonType
    unflatten(constBasicJsonType&value)
    {
    if(JSON_HEDLEY_UNLIKELY(!value.is_object()))
    {
    JSON_THROW(detail::type_error::create(314,"onlyobjectscanbeunflattened",value));
    }

    BasicJsonTyperesult;

    //iteratetheJSONobjectvalues
    for(constauto&element:*value.m_value.object)
    {
    if(JSON_HEDLEY_UNLIKELY(!element.second.is_primitive()))
    {
    JSON_THROW(detail::type_error::create(315,"valuesinobjectmustbeprimitive",element.second));
    }

    //assignvaluetoreferencepointedtobyJSONpointer;Notethatif
    //theJSONpointeris""(i.e.,pointstothewholevalue),function
    //get_and_createreturnsareferencetoresultitself.Anassignment
    //willthencreateaprimitivevalue.
    json_pointer(element.first).get_and_create(result)=element.second;
    }

    returnresult;
    }

    friendbooloperator==(json_pointerconst&lhs,
    json_pointerconst&rhs)noexcept
    {
    returnlhs.reference_tokens==rhs.reference_tokens;
    }

    friendbooloperator!=(json_pointerconst&lhs,
    json_pointerconst&rhs)noexcept
    {
    return!(lhs==rhs);
    }

    std::vector<std::string>reference_tokens;
    };
    }//namespacenlohmann

    //#include<nlohmann/detail/json_ref.hpp>

    #include<initializer_list>
    #include<utility>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameBasicJsonType>
    classjson_ref
    {
    public:
    usingvalue_type=BasicJsonType;

    json_ref(value_type&&value)
    :owned_value(std::move(value))
    {}

    json_ref(constvalue_type&value)
    :value_ref(&value)
    {}

    json_ref(std::initializer_list<json_ref>init)
    :owned_value(init)
    {}

    template<
    class...Args,
    enable_if_t<std::is_constructible<value_type,Args...>::value,int>=0>
    json_ref(Args&&...args)
    :owned_value(std::forward<Args>(args)...)
    {}

    //classshouldbemovableonly
    json_ref(json_ref&&)noexcept=default;
    json_ref(constjson_ref&)=delete;
    json_ref&operator=(constjson_ref&)=delete;
    json_ref&operator=(json_ref&&)=delete;
    ~json_ref()=default;

    value_typemoved_or_copied()const
    {
    if(value_ref==nullptr)
    {
    returnstd::move(owned_value);
    }
    return*value_ref;
    }

    value_typeconst&operator*()const
    {
    returnvalue_ref?*value_ref:owned_value;
    }

    value_typeconst*operator->()const
    {
    return&**this;
    }

    private:
    mutablevalue_typeowned_value=nullptr;
    value_typeconst*value_ref=nullptr;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/string_escape.hpp>

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    //#include<nlohmann/detail/meta/type_traits.hpp>

    //#include<nlohmann/detail/output/binary_writer.hpp>

    #include<algorithm>//reverse
    #include<array>//array
    #include<cmath>//isnan,isinf
    #include<cstdint>//uint8_t,uint16_t,uint32_t,uint64_t
    #include<cstring>//memcpy
    #include<limits>//numeric_limits
    #include<string>//string
    #include<utility>//move

    //#include<nlohmann/detail/input/binary_reader.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/output/output_adapters.hpp>

    #include<algorithm>//copy
    #include<cstddef>//size_t
    #include<ios>//streamsize
    #include<iterator>//back_inserter
    #include<memory>//shared_ptr,make_shared
    #include<ostream>//basic_ostream
    #include<string>//basic_string
    #include<vector>//vector
    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    template<typenameCharType>structoutput_adapter_protocol
    {
    virtualvoidwrite_character(CharTypec)=0;
    virtualvoidwrite_characters(constCharType*s,std::size_tlength)=0;
    virtual~output_adapter_protocol()=default;

    output_adapter_protocol()=default;
    output_adapter_protocol(constoutput_adapter_protocol&)=default;
    output_adapter_protocol(output_adapter_protocol&&)noexcept=default;
    output_adapter_protocol&operator=(constoutput_adapter_protocol&)=default;
    output_adapter_protocol&operator=(output_adapter_protocol&&)noexcept=default;
    };

    template<typenameCharType>
    usingoutput_adapter_t=std::shared_ptr<output_adapter_protocol<CharType>>;

    template<typenameCharType>
    classoutput_vector_adapter:publicoutput_adapter_protocol<CharType>
    {
    public:
    explicitoutput_vector_adapter(std::vector<CharType>&vec)noexcept
    :v(vec)
    {}

    voidwrite_character(CharTypec)override
    {
    v.push_back(c);
    }

    JSON_HEDLEY_NON_NULL(2)
    voidwrite_characters(constCharType*s,std::size_tlength)override
    {
    std::copy(s,s+length,std::back_inserter(v));
    }

    private:
    std::vector<CharType>&v;
    };

    template<typenameCharType>
    classoutput_stream_adapter:publicoutput_adapter_protocol<CharType>
    {
    public:
    explicitoutput_stream_adapter(std::basic_ostream<CharType>&s)noexcept
    :stream(s)
    {}

    voidwrite_character(CharTypec)override
    {
    stream.put(c);
    }

    JSON_HEDLEY_NON_NULL(2)
    voidwrite_characters(constCharType*s,std::size_tlength)override
    {
    stream.write(s,static_cast<std::streamsize>(length));
    }

    private:
    std::basic_ostream<CharType>&stream;
    };

    template<typenameCharType,typenameStringType=std::basic_string<CharType>>
    classoutput_string_adapter:publicoutput_adapter_protocol<CharType>
    {
    public:
    explicitoutput_string_adapter(StringType&s)noexcept
    :str(s)
    {}

    voidwrite_character(CharTypec)override
    {
    str.push_back(c);
    }

    JSON_HEDLEY_NON_NULL(2)
    voidwrite_characters(constCharType*s,std::size_tlength)override
    {
    str.append(s,length);
    }

    private:
    StringType&str;
    };

    template<typenameCharType,typenameStringType=std::basic_string<CharType>>
    classoutput_adapter
    {
    public:
    output_adapter(std::vector<CharType>&vec)
    :oa(std::make_shared<output_vector_adapter<CharType>>(vec)){}

    output_adapter(std::basic_ostream<CharType>&s)
    :oa(std::make_shared<output_stream_adapter<CharType>>(s)){}

    output_adapter(StringType&s)
    :oa(std::make_shared<output_string_adapter<CharType,StringType>>(s)){}

    operatoroutput_adapter_t<CharType>()
    {
    returnoa;
    }

    private:
    output_adapter_t<CharType>oa=nullptr;
    };
    }//namespacedetail
    }//namespacenlohmann

    namespacenlohmann
    {
    namespacedetail
    {
    //binarywriter//

    template<typenameBasicJsonType,typenameCharType>
    classbinary_writer
    {
    usingstring_t=typenameBasicJsonType::string_t;
    usingbinary_t=typenameBasicJsonType::binary_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;

    public:
    explicitbinary_writer(output_adapter_t<CharType>adapter):oa(std::move(adapter))
    {
    JSON_ASSERT(oa);
    }

    voidwrite_bson(constBasicJsonType&j)
    {
    switch(j.type())
    {
    casevalue_t::object:
    {
    write_bson_object(*j.m_value.object);
    break;
    }

    default:
    {
    JSON_THROW(type_error::create(317,"toserializetoBSON,top-leveltypemustbeobject,butis"+std::string(j.type_name()),j));;
    }
    }
    }

    voidwrite_cbor(constBasicJsonType&j)
    {
    switch(j.type())
    {
    casevalue_t::null:
    {
    oa->write_character(to_char_type(0xF6));
    break;
    }

    casevalue_t::boolean:
    {
    oa->write_character(j.m_value.boolean
    ?to_char_type(0xF5)
    :to_char_type(0xF4));
    break;
    }

    casevalue_t::number_integer:
    {
    if(j.m_value.number_integer>=0)
    {
    //CBORdoesnotdifferentiatebetweenpositivesigned
    //integersandunsignedintegers.Therefore,weusedthe
    //codefromthevalue_t::number_unsignedcasehere.
    if(j.m_value.number_integer<=0x17)
    {
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x18));
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x19));
    write_number(static_cast<std::uint16_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x1A));
    write_number(static_cast<std::uint32_t>(j.m_value.number_integer));
    }
    else
    {
    oa->write_character(to_char_type(0x1B));
    write_number(static_cast<std::uint64_t>(j.m_value.number_integer));
    }
    }
    else
    {
    //Theconversionsbelowencodethesigninthefirst
    //byte,andthevalueisconvertedtoapositivenumber.
    constautopositive_number=-1-j.m_value.number_integer;
    if(j.m_value.number_integer>=-24)
    {
    write_number(static_cast<std::uint8_t>(0x20+positive_number));
    }
    elseif(positive_number<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x38));
    write_number(static_cast<std::uint8_t>(positive_number));
    }
    elseif(positive_number<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x39));
    write_number(static_cast<std::uint16_t>(positive_number));
    }
    elseif(positive_number<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x3A));
    write_number(static_cast<std::uint32_t>(positive_number));
    }
    else
    {
    oa->write_character(to_char_type(0x3B));
    write_number(static_cast<std::uint64_t>(positive_number));
    }
    }
    break;
    }

    casevalue_t::number_unsigned:
    {
    if(j.m_value.number_unsigned<=0x17)
    {
    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x18));
    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x19));
    write_number(static_cast<std::uint16_t>(j.m_value.number_unsigned));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x1A));
    write_number(static_cast<std::uint32_t>(j.m_value.number_unsigned));
    }
    else
    {
    oa->write_character(to_char_type(0x1B));
    write_number(static_cast<std::uint64_t>(j.m_value.number_unsigned));
    }
    break;
    }

    casevalue_t::number_float:
    {
    if(std::isnan(j.m_value.number_float))
    {
    //NaNis0xf97e00inCBOR
    oa->write_character(to_char_type(0xF9));
    oa->write_character(to_char_type(0x7E));
    oa->write_character(to_char_type(0x00));
    }
    elseif(std::isinf(j.m_value.number_float))
    {
    //Infinityis0xf97c00,-Infinityis0xf9fc00
    oa->write_character(to_char_type(0xf9));
    oa->write_character(j.m_value.number_float>0?to_char_type(0x7C):to_char_type(0xFC));
    oa->write_character(to_char_type(0x00));
    }
    else
    {
    write_compact_float(j.m_value.number_float,detail::input_format_t::cbor);
    }
    break;
    }

    casevalue_t::string:
    {
    //step1:writecontrolbyteandthestringlength
    constautoN=j.m_value.string->size();
    if(N<=0x17)
    {
    write_number(static_cast<std::uint8_t>(0x60+N));
    }
    elseif(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x78));
    write_number(static_cast<std::uint8_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x79));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x7A));
    write_number(static_cast<std::uint32_t>(N));
    }
    //LCOV_EXCL_START
    elseif(N<=(std::numeric_limits<std::uint64_t>::max)())
    {
    oa->write_character(to_char_type(0x7B));
    write_number(static_cast<std::uint64_t>(N));
    }
    //LCOV_EXCL_STOP

    //step2:writethestring
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.string->c_str()),
    j.m_value.string->size());
    break;
    }

    casevalue_t::array:
    {
    //step1:writecontrolbyteandthearraysize
    constautoN=j.m_value.array->size();
    if(N<=0x17)
    {
    write_number(static_cast<std::uint8_t>(0x80+N));
    }
    elseif(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x98));
    write_number(static_cast<std::uint8_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x99));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x9A));
    write_number(static_cast<std::uint32_t>(N));
    }
    //LCOV_EXCL_START
    elseif(N<=(std::numeric_limits<std::uint64_t>::max)())
    {
    oa->write_character(to_char_type(0x9B));
    write_number(static_cast<std::uint64_t>(N));
    }
    //LCOV_EXCL_STOP

    //step2:writeeachelement
    for(constauto&el:*j.m_value.array)
    {
    write_cbor(el);
    }
    break;
    }

    casevalue_t::binary:
    {
    if(j.m_value.binary->has_subtype())
    {
    write_number(static_cast<std::uint8_t>(0xd8));
    write_number(j.m_value.binary->subtype());
    }

    //step1:writecontrolbyteandthebinaryarraysize
    constautoN=j.m_value.binary->size();
    if(N<=0x17)
    {
    write_number(static_cast<std::uint8_t>(0x40+N));
    }
    elseif(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0x58));
    write_number(static_cast<std::uint8_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0x59));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0x5A));
    write_number(static_cast<std::uint32_t>(N));
    }
    //LCOV_EXCL_START
    elseif(N<=(std::numeric_limits<std::uint64_t>::max)())
    {
    oa->write_character(to_char_type(0x5B));
    write_number(static_cast<std::uint64_t>(N));
    }
    //LCOV_EXCL_STOP

    //step2:writeeachelement
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.binary->data()),
    N);

    break;
    }

    casevalue_t::object:
    {
    //step1:writecontrolbyteandtheobjectsize
    constautoN=j.m_value.object->size();
    if(N<=0x17)
    {
    write_number(static_cast<std::uint8_t>(0xA0+N));
    }
    elseif(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    oa->write_character(to_char_type(0xB8));
    write_number(static_cast<std::uint8_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    oa->write_character(to_char_type(0xB9));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    oa->write_character(to_char_type(0xBA));
    write_number(static_cast<std::uint32_t>(N));
    }
    //LCOV_EXCL_START
    elseif(N<=(std::numeric_limits<std::uint64_t>::max)())
    {
    oa->write_character(to_char_type(0xBB));
    write_number(static_cast<std::uint64_t>(N));
    }
    //LCOV_EXCL_STOP

    //step2:writeeachelement
    for(constauto&el:*j.m_value.object)
    {
    write_cbor(el.first);
    write_cbor(el.second);
    }
    break;
    }

    default:
    break;
    }
    }

    voidwrite_msgpack(constBasicJsonType&j)
    {
    switch(j.type())
    {
    casevalue_t::null://nil
    {
    oa->write_character(to_char_type(0xC0));
    break;
    }

    casevalue_t::boolean://trueandfalse
    {
    oa->write_character(j.m_value.boolean
    ?to_char_type(0xC3)
    :to_char_type(0xC2));
    break;
    }

    casevalue_t::number_integer:
    {
    if(j.m_value.number_integer>=0)
    {
    //MessagePackdoesnotdifferentiatebetweenpositive
    //signedintegersandunsignedintegers.Therefore,weused
    //thecodefromthevalue_t::number_unsignedcasehere.
    if(j.m_value.number_unsigned<128)
    {
    //positivefixnum
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint8_t>::max)())
    {
    //uint8
    oa->write_character(to_char_type(0xCC));
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint16_t>::max)())
    {
    //uint16
    oa->write_character(to_char_type(0xCD));
    write_number(static_cast<std::uint16_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint32_t>::max)())
    {
    //uint32
    oa->write_character(to_char_type(0xCE));
    write_number(static_cast<std::uint32_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint64_t>::max)())
    {
    //uint64
    oa->write_character(to_char_type(0xCF));
    write_number(static_cast<std::uint64_t>(j.m_value.number_integer));
    }
    }
    else
    {
    if(j.m_value.number_integer>=-32)
    {
    //negativefixnum
    write_number(static_cast<std::int8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer>=(std::numeric_limits<std::int8_t>::min)()&&
    j.m_value.number_integer<=(std::numeric_limits<std::int8_t>::max)())
    {
    //int8
    oa->write_character(to_char_type(0xD0));
    write_number(static_cast<std::int8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer>=(std::numeric_limits<std::int16_t>::min)()&&
    j.m_value.number_integer<=(std::numeric_limits<std::int16_t>::max)())
    {
    //int16
    oa->write_character(to_char_type(0xD1));
    write_number(static_cast<std::int16_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer>=(std::numeric_limits<std::int32_t>::min)()&&
    j.m_value.number_integer<=(std::numeric_limits<std::int32_t>::max)())
    {
    //int32
    oa->write_character(to_char_type(0xD2));
    write_number(static_cast<std::int32_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_integer>=(std::numeric_limits<std::int64_t>::min)()&&
    j.m_value.number_integer<=(std::numeric_limits<std::int64_t>::max)())
    {
    //int64
    oa->write_character(to_char_type(0xD3));
    write_number(static_cast<std::int64_t>(j.m_value.number_integer));
    }
    }
    break;
    }

    casevalue_t::number_unsigned:
    {
    if(j.m_value.number_unsigned<128)
    {
    //positivefixnum
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint8_t>::max)())
    {
    //uint8
    oa->write_character(to_char_type(0xCC));
    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint16_t>::max)())
    {
    //uint16
    oa->write_character(to_char_type(0xCD));
    write_number(static_cast<std::uint16_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint32_t>::max)())
    {
    //uint32
    oa->write_character(to_char_type(0xCE));
    write_number(static_cast<std::uint32_t>(j.m_value.number_integer));
    }
    elseif(j.m_value.number_unsigned<=(std::numeric_limits<std::uint64_t>::max)())
    {
    //uint64
    oa->write_character(to_char_type(0xCF));
    write_number(static_cast<std::uint64_t>(j.m_value.number_integer));
    }
    break;
    }

    casevalue_t::number_float:
    {
    write_compact_float(j.m_value.number_float,detail::input_format_t::msgpack);
    break;
    }

    casevalue_t::string:
    {
    //step1:writecontrolbyteandthestringlength
    constautoN=j.m_value.string->size();
    if(N<=31)
    {
    //fixstr
    write_number(static_cast<std::uint8_t>(0xA0|N));
    }
    elseif(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    //str8
    oa->write_character(to_char_type(0xD9));
    write_number(static_cast<std::uint8_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    //str16
    oa->write_character(to_char_type(0xDA));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    //str32
    oa->write_character(to_char_type(0xDB));
    write_number(static_cast<std::uint32_t>(N));
    }

    //step2:writethestring
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.string->c_str()),
    j.m_value.string->size());
    break;
    }

    casevalue_t::array:
    {
    //step1:writecontrolbyteandthearraysize
    constautoN=j.m_value.array->size();
    if(N<=15)
    {
    //fixarray
    write_number(static_cast<std::uint8_t>(0x90|N));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    //array16
    oa->write_character(to_char_type(0xDC));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    //array32
    oa->write_character(to_char_type(0xDD));
    write_number(static_cast<std::uint32_t>(N));
    }

    //step2:writeeachelement
    for(constauto&el:*j.m_value.array)
    {
    write_msgpack(el);
    }
    break;
    }

    casevalue_t::binary:
    {
    //step0:determineifthebinarytypehasasetsubtypeto
    //determinewhetherornottousetheextorfixexttypes
    constbooluse_ext=j.m_value.binary->has_subtype();

    //step1:writecontrolbyteandthebytestringlength
    constautoN=j.m_value.binary->size();
    if(N<=(std::numeric_limits<std::uint8_t>::max)())
    {
    std::uint8_toutput_type{};
    boolfixed=true;
    if(use_ext)
    {
    switch(N)
    {
    case1:
    output_type=0xD4;//fixext1
    break;
    case2:
    output_type=0xD5;//fixext2
    break;
    case4:
    output_type=0xD6;//fixext4
    break;
    case8:
    output_type=0xD7;//fixext8
    break;
    case16:
    output_type=0xD8;//fixext16
    break;
    default:
    output_type=0xC7;//ext8
    fixed=false;
    break;
    }

    }
    else
    {
    output_type=0xC4;//bin8
    fixed=false;
    }

    oa->write_character(to_char_type(output_type));
    if(!fixed)
    {
    write_number(static_cast<std::uint8_t>(N));
    }
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    std::uint8_toutput_type=use_ext
    ?0xC8//ext16
    :0xC5;//bin16

    oa->write_character(to_char_type(output_type));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    std::uint8_toutput_type=use_ext
    ?0xC9//ext32
    :0xC6;//bin32

    oa->write_character(to_char_type(output_type));
    write_number(static_cast<std::uint32_t>(N));
    }

    //step1.5:ifthisisanexttype,writethesubtype
    if(use_ext)
    {
    write_number(static_cast<std::int8_t>(j.m_value.binary->subtype()));
    }

    //step2:writethebytestring
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.binary->data()),
    N);

    break;
    }

    casevalue_t::object:
    {
    //step1:writecontrolbyteandtheobjectsize
    constautoN=j.m_value.object->size();
    if(N<=15)
    {
    //fixmap
    write_number(static_cast<std::uint8_t>(0x80|(N&0xF)));
    }
    elseif(N<=(std::numeric_limits<std::uint16_t>::max)())
    {
    //map16
    oa->write_character(to_char_type(0xDE));
    write_number(static_cast<std::uint16_t>(N));
    }
    elseif(N<=(std::numeric_limits<std::uint32_t>::max)())
    {
    //map32
    oa->write_character(to_char_type(0xDF));
    write_number(static_cast<std::uint32_t>(N));
    }

    //step2:writeeachelement
    for(constauto&el:*j.m_value.object)
    {
    write_msgpack(el.first);
    write_msgpack(el.second);
    }
    break;
    }

    default:
    break;
    }
    }

    voidwrite_ubjson(constBasicJsonType&j,constbooluse_count,
    constbooluse_type,constbooladd_prefix=true)
    {
    switch(j.type())
    {
    casevalue_t::null:
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('Z'));
    }
    break;
    }

    casevalue_t::boolean:
    {
    if(add_prefix)
    {
    oa->write_character(j.m_value.boolean
    ?to_char_type('T')
    :to_char_type('F'));
    }
    break;
    }

    casevalue_t::number_integer:
    {
    write_number_with_ubjson_prefix(j.m_value.number_integer,add_prefix);
    break;
    }

    casevalue_t::number_unsigned:
    {
    write_number_with_ubjson_prefix(j.m_value.number_unsigned,add_prefix);
    break;
    }

    casevalue_t::number_float:
    {
    write_number_with_ubjson_prefix(j.m_value.number_float,add_prefix);
    break;
    }

    casevalue_t::string:
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('S'));
    }
    write_number_with_ubjson_prefix(j.m_value.string->size(),true);
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.string->c_str()),
    j.m_value.string->size());
    break;
    }

    casevalue_t::array:
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('['));
    }

    boolprefix_required=true;
    if(use_type&&!j.m_value.array->empty())
    {
    JSON_ASSERT(use_count);
    constCharTypefirst_prefix=ubjson_prefix(j.front());
    constboolsame_prefix=std::all_of(j.begin()+1,j.end(),
    [this,first_prefix](constBasicJsonType&v)
    {
    returnubjson_prefix(v)==first_prefix;
    });

    if(same_prefix)
    {
    prefix_required=false;
    oa->write_character(to_char_type('$'));
    oa->write_character(first_prefix);
    }
    }

    if(use_count)
    {
    oa->write_character(to_char_type('#'));
    write_number_with_ubjson_prefix(j.m_value.array->size(),true);
    }

    for(constauto&el:*j.m_value.array)
    {
    write_ubjson(el,use_count,use_type,prefix_required);
    }

    if(!use_count)
    {
    oa->write_character(to_char_type(']'));
    }

    break;
    }

    casevalue_t::binary:
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('['));
    }

    if(use_type&&!j.m_value.binary->empty())
    {
    JSON_ASSERT(use_count);
    oa->write_character(to_char_type('$'));
    oa->write_character('U');
    }

    if(use_count)
    {
    oa->write_character(to_char_type('#'));
    write_number_with_ubjson_prefix(j.m_value.binary->size(),true);
    }

    if(use_type)
    {
    oa->write_characters(
    reinterpret_cast<constCharType*>(j.m_value.binary->data()),
    j.m_value.binary->size());
    }
    else
    {
    for(size_ti=0;i<j.m_value.binary->size();++i)
    {
    oa->write_character(to_char_type('U'));
    oa->write_character(j.m_value.binary->data()[i]);
    }
    }

    if(!use_count)
    {
    oa->write_character(to_char_type(']'));
    }

    break;
    }

    casevalue_t::object:
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('{'));
    }

    boolprefix_required=true;
    if(use_type&&!j.m_value.object->empty())
    {
    JSON_ASSERT(use_count);
    constCharTypefirst_prefix=ubjson_prefix(j.front());
    constboolsame_prefix=std::all_of(j.begin(),j.end(),
    [this,first_prefix](constBasicJsonType&v)
    {
    returnubjson_prefix(v)==first_prefix;
    });

    if(same_prefix)
    {
    prefix_required=false;
    oa->write_character(to_char_type('$'));
    oa->write_character(first_prefix);
    }
    }

    if(use_count)
    {
    oa->write_character(to_char_type('#'));
    write_number_with_ubjson_prefix(j.m_value.object->size(),true);
    }

    for(constauto&el:*j.m_value.object)
    {
    write_number_with_ubjson_prefix(el.first.size(),true);
    oa->write_characters(
    reinterpret_cast<constCharType*>(el.first.c_str()),
    el.first.size());
    write_ubjson(el.second,use_count,use_type,prefix_required);
    }

    if(!use_count)
    {
    oa->write_character(to_char_type('}'));
    }

    break;
    }

    default:
    break;
    }
    }

    private:
    //BSON//

    staticstd::size_tcalc_bson_entry_header_size(conststring_t&name,constBasicJsonType&j)
    {
    constautoit=name.find(static_cast<typenamestring_t::value_type>(0));
    if(JSON_HEDLEY_UNLIKELY(it!=BasicJsonType::string_t::npos))
    {
    JSON_THROW(out_of_range::create(409,"BSONkeycannotcontaincodepointU+0000(atbyte"+std::to_string(it)+")",j));
    }

    return/*id*/1ul+name.size()+/*zero-terminator*/1u;
    }

    voidwrite_bson_entry_header(conststring_t&name,
    conststd::uint8_telement_type)
    {
    oa->write_character(to_char_type(element_type));//boolean
    oa->write_characters(
    reinterpret_cast<constCharType*>(name.c_str()),
    name.size()+1u);
    }

    voidwrite_bson_boolean(conststring_t&name,
    constboolvalue)
    {
    write_bson_entry_header(name,0x08);
    oa->write_character(value?to_char_type(0x01):to_char_type(0x00));
    }

    voidwrite_bson_double(conststring_t&name,
    constdoublevalue)
    {
    write_bson_entry_header(name,0x01);
    write_number<double,true>(value);
    }

    staticstd::size_tcalc_bson_string_size(conststring_t&value)
    {
    returnsizeof(std::int32_t)+value.size()+1ul;
    }

    voidwrite_bson_string(conststring_t&name,
    conststring_t&value)
    {
    write_bson_entry_header(name,0x02);

    write_number<std::int32_t,true>(static_cast<std::int32_t>(value.size()+1ul));
    oa->write_characters(
    reinterpret_cast<constCharType*>(value.c_str()),
    value.size()+1);
    }

    voidwrite_bson_null(conststring_t&name)
    {
    write_bson_entry_header(name,0x0A);
    }

    staticstd::size_tcalc_bson_integer_size(conststd::int64_tvalue)
    {
    return(std::numeric_limits<std::int32_t>::min)()<=value&&value<=(std::numeric_limits<std::int32_t>::max)()
    ?sizeof(std::int32_t)
    :sizeof(std::int64_t);
    }

    voidwrite_bson_integer(conststring_t&name,
    conststd::int64_tvalue)
    {
    if((std::numeric_limits<std::int32_t>::min)()<=value&&value<=(std::numeric_limits<std::int32_t>::max)())
    {
    write_bson_entry_header(name,0x10);//int32
    write_number<std::int32_t,true>(static_cast<std::int32_t>(value));
    }
    else
    {
    write_bson_entry_header(name,0x12);//int64
    write_number<std::int64_t,true>(static_cast<std::int64_t>(value));
    }
    }

    staticconstexprstd::size_tcalc_bson_unsigned_size(conststd::uint64_tvalue)noexcept
    {
    return(value<=static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
    ?sizeof(std::int32_t)
    :sizeof(std::int64_t);
    }

    voidwrite_bson_unsigned(conststring_t&name,
    constBasicJsonType&j)
    {
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
    {
    write_bson_entry_header(name,0x10/*int32*/);
    write_number<std::int32_t,true>(static_cast<std::int32_t>(j.m_value.number_unsigned));
    }
    elseif(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))
    {
    write_bson_entry_header(name,0x12/*int64*/);
    write_number<std::int64_t,true>(static_cast<std::int64_t>(j.m_value.number_unsigned));
    }
    else
    {
    JSON_THROW(out_of_range::create(407,"integernumber"+std::to_string(j.m_value.number_unsigned)+"cannotberepresentedbyBSONasitdoesnotfitint64",j));
    }
    }

    voidwrite_bson_object_entry(conststring_t&name,
    consttypenameBasicJsonType::object_t&value)
    {
    write_bson_entry_header(name,0x03);//object
    write_bson_object(value);
    }

    staticstd::size_tcalc_bson_array_size(consttypenameBasicJsonType::array_t&value)
    {
    std::size_tarray_index=0ul;

    conststd::size_tembedded_document_size=std::accumulate(std::begin(value),std::end(value),std::size_t(0),[&array_index](std::size_tresult,consttypenameBasicJsonType::array_t::value_type&el)
    {
    returnresult+calc_bson_element_size(std::to_string(array_index++),el);
    });

    returnsizeof(std::int32_t)+embedded_document_size+1ul;
    }

    staticstd::size_tcalc_bson_binary_size(consttypenameBasicJsonType::binary_t&value)
    {
    returnsizeof(std::int32_t)+value.size()+1ul;
    }

    voidwrite_bson_array(conststring_t&name,
    consttypenameBasicJsonType::array_t&value)
    {
    write_bson_entry_header(name,0x04);//array
    write_number<std::int32_t,true>(static_cast<std::int32_t>(calc_bson_array_size(value)));

    std::size_tarray_index=0ul;

    for(constauto&el:value)
    {
    write_bson_element(std::to_string(array_index++),el);
    }

    oa->write_character(to_char_type(0x00));
    }

    voidwrite_bson_binary(conststring_t&name,
    constbinary_t&value)
    {
    write_bson_entry_header(name,0x05);

    write_number<std::int32_t,true>(static_cast<std::int32_t>(value.size()));
    write_number(value.has_subtype()?value.subtype():std::uint8_t(0x00));

    oa->write_characters(reinterpret_cast<constCharType*>(value.data()),value.size());
    }

    staticstd::size_tcalc_bson_element_size(conststring_t&name,
    constBasicJsonType&j)
    {
    constautoheader_size=calc_bson_entry_header_size(name,j);
    switch(j.type())
    {
    casevalue_t::object:
    returnheader_size+calc_bson_object_size(*j.m_value.object);

    casevalue_t::array:
    returnheader_size+calc_bson_array_size(*j.m_value.array);

    casevalue_t::binary:
    returnheader_size+calc_bson_binary_size(*j.m_value.binary);

    casevalue_t::boolean:
    returnheader_size+1ul;

    casevalue_t::number_float:
    returnheader_size+8ul;

    casevalue_t::number_integer:
    returnheader_size+calc_bson_integer_size(j.m_value.number_integer);

    casevalue_t::number_unsigned:
    returnheader_size+calc_bson_unsigned_size(j.m_value.number_unsigned);

    casevalue_t::string:
    returnheader_size+calc_bson_string_size(*j.m_value.string);

    casevalue_t::null:
    returnheader_size+0ul;

    //LCOV_EXCL_START
    default:
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
    return0ul;
    //LCOV_EXCL_STOP
    }
    }

    voidwrite_bson_element(conststring_t&name,
    constBasicJsonType&j)
    {
    switch(j.type())
    {
    casevalue_t::object:
    returnwrite_bson_object_entry(name,*j.m_value.object);

    casevalue_t::array:
    returnwrite_bson_array(name,*j.m_value.array);

    casevalue_t::binary:
    returnwrite_bson_binary(name,*j.m_value.binary);

    casevalue_t::boolean:
    returnwrite_bson_boolean(name,j.m_value.boolean);

    casevalue_t::number_float:
    returnwrite_bson_double(name,j.m_value.number_float);

    casevalue_t::number_integer:
    returnwrite_bson_integer(name,j.m_value.number_integer);

    casevalue_t::number_unsigned:
    returnwrite_bson_unsigned(name,j);

    casevalue_t::string:
    returnwrite_bson_string(name,*j.m_value.string);

    casevalue_t::null:
    returnwrite_bson_null(name);

    //LCOV_EXCL_START
    default:
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
    return;
    //LCOV_EXCL_STOP
    }
    }

    staticstd::size_tcalc_bson_object_size(consttypenameBasicJsonType::object_t&value)
    {
    std::size_tdocument_size=std::accumulate(value.begin(),value.end(),std::size_t(0),
    [](size_tresult,consttypenameBasicJsonType::object_t::value_type&el)
    {
    returnresult+=calc_bson_element_size(el.first,el.second);
    });

    returnsizeof(std::int32_t)+document_size+1ul;
    }

    voidwrite_bson_object(consttypenameBasicJsonType::object_t&value)
    {
    write_number<std::int32_t,true>(static_cast<std::int32_t>(calc_bson_object_size(value)));

    for(constauto&el:value)
    {
    write_bson_element(el.first,el.second);
    }

    oa->write_character(to_char_type(0x00));
    }

    //CBOR//

    staticconstexprCharTypeget_cbor_float_prefix(float/*unused*/)
    {
    returnto_char_type(0xFA);//Single-PrecisionFloat
    }

    staticconstexprCharTypeget_cbor_float_prefix(double/*unused*/)
    {
    returnto_char_type(0xFB);//Double-PrecisionFloat
    }

    //MsgPack//

    staticconstexprCharTypeget_msgpack_float_prefix(float/*unused*/)
    {
    returnto_char_type(0xCA);//float32
    }

    staticconstexprCharTypeget_msgpack_float_prefix(double/*unused*/)
    {
    returnto_char_type(0xCB);//float64
    }

    //UBJSON//

    //UBJSON:writenumber(floatingpoint)
    template<typenameNumberType,typenamestd::enable_if<
    std::is_floating_point<NumberType>::value,int>::type=0>
    voidwrite_number_with_ubjson_prefix(constNumberTypen,
    constbooladd_prefix)
    {
    if(add_prefix)
    {
    oa->write_character(get_ubjson_float_prefix(n));
    }
    write_number(n);
    }

    //UBJSON:writenumber(unsignedinteger)
    template<typenameNumberType,typenamestd::enable_if<
    std::is_unsigned<NumberType>::value,int>::type=0>
    voidwrite_number_with_ubjson_prefix(constNumberTypen,
    constbooladd_prefix)
    {
    if(n<=static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('i'));//int8
    }
    write_number(static_cast<std::uint8_t>(n));
    }
    elseif(n<=(std::numeric_limits<std::uint8_t>::max)())
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('U'));//uint8
    }
    write_number(static_cast<std::uint8_t>(n));
    }
    elseif(n<=static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('I'));//int16
    }
    write_number(static_cast<std::int16_t>(n));
    }
    elseif(n<=static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('l'));//int32
    }
    write_number(static_cast<std::int32_t>(n));
    }
    elseif(n<=static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('L'));//int64
    }
    write_number(static_cast<std::int64_t>(n));
    }
    else
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('H'));//high-precisionnumber
    }

    constautonumber=BasicJsonType(n).dump();
    write_number_with_ubjson_prefix(number.size(),true);
    for(std::size_ti=0;i<number.size();++i)
    {
    oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i])));
    }
    }
    }

    //UBJSON:writenumber(signedinteger)
    template<typenameNumberType,typenamestd::enable_if<
    std::is_signed<NumberType>::value&&
    !std::is_floating_point<NumberType>::value,int>::type=0>
    voidwrite_number_with_ubjson_prefix(constNumberTypen,
    constbooladd_prefix)
    {
    if((std::numeric_limits<std::int8_t>::min)()<=n&&n<=(std::numeric_limits<std::int8_t>::max)())
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('i'));//int8
    }
    write_number(static_cast<std::int8_t>(n));
    }
    elseif(static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)())<=n&&n<=static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)()))
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('U'));//uint8
    }
    write_number(static_cast<std::uint8_t>(n));
    }
    elseif((std::numeric_limits<std::int16_t>::min)()<=n&&n<=(std::numeric_limits<std::int16_t>::max)())
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('I'));//int16
    }
    write_number(static_cast<std::int16_t>(n));
    }
    elseif((std::numeric_limits<std::int32_t>::min)()<=n&&n<=(std::numeric_limits<std::int32_t>::max)())
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('l'));//int32
    }
    write_number(static_cast<std::int32_t>(n));
    }
    elseif((std::numeric_limits<std::int64_t>::min)()<=n&&n<=(std::numeric_limits<std::int64_t>::max)())
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('L'));//int64
    }
    write_number(static_cast<std::int64_t>(n));
    }
    //LCOV_EXCL_START
    else
    {
    if(add_prefix)
    {
    oa->write_character(to_char_type('H'));//high-precisionnumber
    }

    constautonumber=BasicJsonType(n).dump();
    write_number_with_ubjson_prefix(number.size(),true);
    for(std::size_ti=0;i<number.size();++i)
    {
    oa->write_character(to_char_type(static_cast<std::uint8_t>(number[i])));
    }
    }
    //LCOV_EXCL_STOP
    }

    CharTypeubjson_prefix(constBasicJsonType&j)constnoexcept
    {
    switch(j.type())
    {
    casevalue_t::null:
    return'Z';

    casevalue_t::boolean:
    returnj.m_value.boolean?'T':'F';

    casevalue_t::number_integer:
    {
    if((std::numeric_limits<std::int8_t>::min)()<=j.m_value.number_integer&&j.m_value.number_integer<=(std::numeric_limits<std::int8_t>::max)())
    {
    return'i';
    }
    if((std::numeric_limits<std::uint8_t>::min)()<=j.m_value.number_integer&&j.m_value.number_integer<=(std::numeric_limits<std::uint8_t>::max)())
    {
    return'U';
    }
    if((std::numeric_limits<std::int16_t>::min)()<=j.m_value.number_integer&&j.m_value.number_integer<=(std::numeric_limits<std::int16_t>::max)())
    {
    return'I';
    }
    if((std::numeric_limits<std::int32_t>::min)()<=j.m_value.number_integer&&j.m_value.number_integer<=(std::numeric_limits<std::int32_t>::max)())
    {
    return'l';
    }
    if((std::numeric_limits<std::int64_t>::min)()<=j.m_value.number_integer&&j.m_value.number_integer<=(std::numeric_limits<std::int64_t>::max)())
    {
    return'L';
    }
    //anythingelseistreatedashigh-precisionnumber
    return'H';//LCOV_EXCL_LINE
    }

    casevalue_t::number_unsigned:
    {
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))
    {
    return'i';
    }
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)()))
    {
    return'U';
    }
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))
    {
    return'I';
    }
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
    {
    return'l';
    }
    if(j.m_value.number_unsigned<=static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))
    {
    return'L';
    }
    //anythingelseistreatedashigh-precisionnumber
    return'H';//LCOV_EXCL_LINE
    }

    casevalue_t::number_float:
    returnget_ubjson_float_prefix(j.m_value.number_float);

    casevalue_t::string:
    return'S';

    casevalue_t::array://fallthrough
    casevalue_t::binary:
    return'[';

    casevalue_t::object:
    return'{';

    default://discardedvalues
    return'N';
    }
    }

    staticconstexprCharTypeget_ubjson_float_prefix(float/*unused*/)
    {
    return'd';//float32
    }

    staticconstexprCharTypeget_ubjson_float_prefix(double/*unused*/)
    {
    return'D';//float64
    }

    //Utilityfunctions//

    /*
    @briefwriteanumbertooutputinput
    @param[in]nnumberoftype@aNumberType
    @tparamNumberTypethetypeofthenumber
    @tparamOutputIsLittleEndianSettotrueifoutputdatais
    requiredtobelittleendian

    @noteThisfunctionneedstorespectthesystem'sendianess,becausebytes
    inCBOR,MessagePack,andUBJSONarestoredinnetworkorder(big
    endian)andthereforeneedreorderingonlittleendiansystems.
    */
    template<typenameNumberType,boolOutputIsLittleEndian=false>
    voidwrite_number(constNumberTypen)
    {
    //step1:writenumbertoarrayoflengthNumberType
    std::array<CharType,sizeof(NumberType)>vec{};
    std::memcpy(vec.data(),&n,sizeof(NumberType));

    //step2:writearraytooutput(withpossiblereordering)
    if(is_little_endian!=OutputIsLittleEndian)
    {
    //reversebyteorderpriortoconversionifnecessary
    std::reverse(vec.begin(),vec.end());
    }

    oa->write_characters(vec.data(),sizeof(NumberType));
    }

    voidwrite_compact_float(constnumber_float_tn,detail::input_format_tformat)
    {
    if(static_cast<double>(n)>=static_cast<double>(std::numeric_limits<float>::lowest())&&
    static_cast<double>(n)<=static_cast<double>((std::numeric_limits<float>::max)())&&
    static_cast<double>(static_cast<float>(n))==static_cast<double>(n))
    {
    oa->write_character(format==detail::input_format_t::cbor
    ?get_cbor_float_prefix(static_cast<float>(n))
    :get_msgpack_float_prefix(static_cast<float>(n)));
    write_number(static_cast<float>(n));
    }
    else
    {
    oa->write_character(format==detail::input_format_t::cbor
    ?get_cbor_float_prefix(n)
    :get_msgpack_float_prefix(n));
    write_number(n);
    }
    }

    public:
    //Thefollowingto_char_typefunctionsareimplementtheconversion
    //betweenuint8_tandCharType.IncaseCharTypeisnotunsigned,
    //suchaconversionisrequiredtoallowvaluesgreaterthan128.
    //See<https://github.com/nlohmann/json/issues/1286>foradiscussion.
    template<typenameC=CharType,
    enable_if_t < std::is_signed<C>::value&&std::is_signed<char>::value>*=nullptr>
    staticconstexprCharTypeto_char_type(std::uint8_tx)noexcept
    {
    return*reinterpret_cast<char*>(&x);
    }

    template<typenameC=CharType,
    enable_if_t < std::is_signed<C>::value&&std::is_unsigned<char>::value>*=nullptr>
    staticCharTypeto_char_type(std::uint8_tx)noexcept
    {
    static_assert(sizeof(std::uint8_t)==sizeof(CharType),"sizeofCharTypemustbeequaltostd::uint8_t");
    static_assert(std::is_trivial<CharType>::value,"CharTypemustbetrivial");
    CharTyperesult;
    std::memcpy(&result,&x,sizeof(x));
    returnresult;
    }

    template<typenameC=CharType,
    enable_if_t<std::is_unsigned<C>::value>*=nullptr>
    staticconstexprCharTypeto_char_type(std::uint8_tx)noexcept
    {
    returnx;
    }

    template<typenameInputCharType,typenameC=CharType,
    enable_if_t<
    std::is_signed<C>::value&&
    std::is_signed<char>::value&&
    std::is_same<char,typenamestd::remove_cv<InputCharType>::type>::value
    >*=nullptr>
    staticconstexprCharTypeto_char_type(InputCharTypex)noexcept
    {
    returnx;
    }

    private:
    constboolis_little_endian=little_endianess();

    output_adapter_t<CharType>oa=nullptr;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/output/output_adapters.hpp>

    //#include<nlohmann/detail/output/serializer.hpp>

    #include<algorithm>//reverse,remove,fill,find,none_of
    #include<array>//array
    #include<clocale>//localeconv,lconv
    #include<cmath>//labs,isfinite,isnan,signbit
    #include<cstddef>//size_t,ptrdiff_t
    #include<cstdint>//uint8_t
    #include<cstdio>//snprintf
    #include<limits>//numeric_limits
    #include<string>//string,char_traits
    #include<type_traits>//is_same
    #include<utility>//move

    //#include<nlohmann/detail/conversions/to_chars.hpp>

    #include<array>//array
    #include<cmath>//signbit,isfinite
    #include<cstdint>//intN_t,uintN_t
    #include<cstring>//memcpy,memmove
    #include<limits>//numeric_limits
    #include<type_traits>//conditional

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {
    namespacedetail
    {

    namespacedtoa_impl
    {

    template<typenameTarget,typenameSource>
    Targetreinterpret_bits(constSourcesource)
    {
    static_assert(sizeof(Target)==sizeof(Source),"sizemismatch");

    Targettarget;
    std::memcpy(&target,&source,sizeof(Source));
    returntarget;
    }

    structdiyfp//f*2^e
    {
    staticconstexprintkPrecision=64;//=q

    std::uint64_tf=0;
    inte=0;

    constexprdiyfp(std::uint64_tf_,inte_)noexcept:f(f_),e(e_){}

    staticdiyfpsub(constdiyfp&x,constdiyfp&y)noexcept
    {
    JSON_ASSERT(x.e==y.e);
    JSON_ASSERT(x.f>=y.f);

    return{x.f-y.f,x.e};
    }

    staticdiyfpmul(constdiyfp&x,constdiyfp&y)noexcept
    {
    static_assert(kPrecision==64,"internalerror");

    //Computes:
    //f=round((x.f*y.f)/2^q)
    //e=x.e+y.e+q

    //Emulatethe64-bit*64-bitmultiplication:
    //
    //p=u*v
    //=(u_lo+2^32u_hi)(v_lo+2^32v_hi)
    //=(u_lov_lo)+2^32((u_lov_hi)+(u_hiv_lo))+2^64(u_hiv_hi)
    //=(p0)+2^32((p1)+(p2))+2^64(p3)
    //=(p0_lo+2^32p0_hi)+2^32((p1_lo+2^32p1_hi)+(p2_lo+2^32p2_hi))+2^64(p3)
    //=(p0_lo)+2^32(p0_hi+p1_lo+p2_lo)+2^64(p1_hi+p2_hi+p3)
    //=(p0_lo)+2^32(Q)+2^64(H)
    //=(p0_lo)+2^32(Q_lo+2^32Q_hi)+2^64(H)
    //
    //(SinceQmightbelargerthan2^32-1)
    //
    //=(p0_lo+2^32Q_lo)+2^64(Q_hi+H)
    //
    //(Q_hi+Hdoesnotoverflowa64-bitint)
    //
    //=p_lo+2^64p_hi

    conststd::uint64_tu_lo=x.f&0xFFFFFFFFu;
    conststd::uint64_tu_hi=x.f>>32u;
    conststd::uint64_tv_lo=y.f&0xFFFFFFFFu;
    conststd::uint64_tv_hi=y.f>>32u;

    conststd::uint64_tp0=u_lo*v_lo;
    conststd::uint64_tp1=u_lo*v_hi;
    conststd::uint64_tp2=u_hi*v_lo;
    conststd::uint64_tp3=u_hi*v_hi;

    conststd::uint64_tp0_hi=p0>>32u;
    conststd::uint64_tp1_lo=p1&0xFFFFFFFFu;
    conststd::uint64_tp1_hi=p1>>32u;
    conststd::uint64_tp2_lo=p2&0xFFFFFFFFu;
    conststd::uint64_tp2_hi=p2>>32u;

    std::uint64_tQ=p0_hi+p1_lo+p2_lo;

    //Thefullproductmightnowbecomputedas
    //
    //p_hi=p3+p2_hi+p1_hi+(Q>>32)
    //p_lo=p0_lo+(Q<<32)
    //
    //Butinthisparticularcasehere,thefullp_loisnotrequired.
    //Effectivelyweonlyneedtoaddthehighestbitinp_lotop_hi(and
    //Q_hi+1doesnotoverflow).

    Q+=std::uint64_t{1}<<(64u-32u-1u);//round,tiesup

    conststd::uint64_th=p3+p2_hi+p1_hi+(Q>>32u);

    return{h,x.e+y.e+64};
    }

    staticdiyfpnormalize(diyfpx)noexcept
    {
    JSON_ASSERT(x.f!=0);

    while((x.f>>63u)==0)
    {
    x.f<<=1u;
    x.e--;
    }

    returnx;
    }

    staticdiyfpnormalize_to(constdiyfp&x,constinttarget_exponent)noexcept
    {
    constintdelta=x.e-target_exponent;

    JSON_ASSERT(delta>=0);
    JSON_ASSERT(((x.f<<delta)>>delta)==x.f);

    return{x.f<<delta,target_exponent};
    }
    };

    structboundaries
    {
    diyfpw;
    diyfpminus;
    diyfpplus;
    };

    template<typenameFloatType>
    boundariescompute_boundaries(FloatTypevalue)
    {
    JSON_ASSERT(std::isfinite(value));
    JSON_ASSERT(value>0);

    //ConverttheIEEErepresentationintoadiyfp.
    //
    //Ifvisdenormal:
    //value=0.F*2^(1-bias)=(F)*2^(1-bias-(p-1))
    //Ifvisnormalized:
    //value=1.F*2^(E-bias)=(2^(p-1)+F)*2^(E-bias-(p-1))

    static_assert(std::numeric_limits<FloatType>::is_iec559,
    "internalerror:dtoa_shortrequiresanIEEE-754floating-pointimplementation");

    constexprintkPrecision=std::numeric_limits<FloatType>::digits;//=p(includesthehiddenbit)
    constexprintkBias=std::numeric_limits<FloatType>::max_exponent-1+(kPrecision-1);
    constexprintkMinExp=1-kBias;
    constexprstd::uint64_tkHiddenBit=std::uint64_t{1}<<(kPrecision-1);//=2^(p-1)

    usingbits_type=typenamestd::conditional<kPrecision==24,std::uint32_t,std::uint64_t>::type;

    constautobits=static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value));
    conststd::uint64_tE=bits>>(kPrecision-1);
    conststd::uint64_tF=bits&(kHiddenBit-1);

    constboolis_denormal=E==0;
    constdiyfpv=is_denormal
    ?diyfp(F,kMinExp)
    :diyfp(F+kHiddenBit,static_cast<int>(E)-kBias);

    //Computetheboundariesm-andm+ofthefloating-pointvalue
    //v=f*2^e.
    //
    //Determinev-andv+,thefloating-pointpredecessorandsuccessorifv,
    //respectively.
    //
    //v-=v-2^eiff!=2^(p-1)ore==e_min(A)
    //=v-2^(e-1)iff==2^(p-1)ande>e_min(B)
    //
    //v+=v+2^e
    //
    //Letm-=(v-+v)/2andm+=(v+v+)/2.Allrealnumbers_strictly_
    //betweenm-andm+roundtov,regardlessofhowtheinputrounding
    //algorithmbreaksties.
    //
    //---+-------------+-------------+-------------+-------------+---(A)
    //v-m-vm+v+
    //
    //-----------------+------+------+-------------+-------------+---(B)
    //v-m-vm+v+

    constboollower_boundary_is_closer=F==0&&E>1;
    constdiyfpm_plus=diyfp(2*v.f+1,v.e-1);
    constdiyfpm_minus=lower_boundary_is_closer
    ?diyfp(4*v.f-1,v.e-2)//(B)
    :diyfp(2*v.f-1,v.e-1);//(A)

    //Determinethenormalizedw+=m+.
    constdiyfpw_plus=diyfp::normalize(m_plus);

    //Determinew-=m-suchthate_(w-)=e_(w+).
    constdiyfpw_minus=diyfp::normalize_to(m_minus,w_plus.e);

    return{diyfp::normalize(v),w_minus,w_plus};
    }

    //Givennormalizeddiyfpw,Grisuneedstofinda(normalized)cached
    //power-of-tenc,suchthattheexponentoftheproductc*w=f*2^elies
    //withinacertainrange[alpha,gamma](Definition3.2from[1])
    //
    //alpha<=e=e_c+e_w+q<=gamma
    //
    //or
    //
    //f_c*f_w*2^alpha<=f_c2^(e_c)*f_w2^(e_w)*2^q
    //<=f_c*f_w*2^gamma
    //
    //Sincecandwarenormalized,i.e.2^(q-1)<=f<2^q,thisimplies
    //
    //2^(q-1)*2^(q-1)*2^alpha<=c*w*2^q<2^q*2^q*2^gamma
    //
    //or
    //
    //2^(q-2+alpha)<=c*w<2^(q+gamma)
    //
    //Thechoiceof(alpha,gamma)determinesthesizeofthetableandtheformof
    //thedigitgenerationprocedure.Using(alpha,gamma)=(-60,-32)worksoutwell
    //inpractice:
    //
    //Theideaistocutthenumberc*w=f*2^eintotwoparts,whichcanbe
    //processedindependently:Anintegralpartp1,andafractionalpartp2:
    //
    //f*2^e=((fdiv2^-e)*2^-e+(fmod2^-e))*2^e
    //=(fdiv2^-e)+(fmod2^-e)*2^e
    //=p1+p2*2^e
    //
    //Theconversionofp1intodecimalformrequiresaseriesofdivisionsand
    //modulosby(apowerof)10.Theseoperationsarefasterfor32-bitthanfor
    //64-bitintegers,sop1shouldideallyfitintoa32-bitinteger.Thiscanbe
    //achievedbychoosing
    //
    //-e>=32ore<=-32:=gamma
    //
    //Inordertoconvertthefractionalpart
    //
    //p2*2^e=p2/2^-e=d[-1]/10^1+d[-2]/10^2+...
    //
    //intodecimalform,thefractionisrepeatedlymultipliedby10andthedigits
    //d[-i]areextractedinorder:
    //
    //(10*p2)div2^-e=d[-1]
    //(10*p2)mod2^-e=d[-2]/10^1+...
    //
    //Themultiplicationby10mustnotoverflow.Itissufficienttochoose
    //
    //10*p2<16*p2=2^4*p2<=2^64.
    //
    //Sincep2=fmod2^-e<2^-e,
    //
    //-e<=60ore>=-60:=alpha

    constexprintkAlpha=-60;
    constexprintkGamma=-32;

    structcached_power//c=f*2^e~=10^k
    {
    std::uint64_tf;
    inte;
    intk;
    };

    inlinecached_powerget_cached_power_for_binary_exponent(inte)
    {
    //Now
    //
    //alpha<=e_c+e+q<=gamma(1)
    //==>f_c*2^alpha<=c*2^e*2^q
    //
    //andsincethec'sarenormalized,2^(q-1)<=f_c,
    //
    //==>2^(q-1+alpha)<=c*2^(e+q)
    //==>2^(alpha-e-1)<=c
    //
    //Ifcwereanexactpoweroften,i.e.c=10^k,onemaydeterminekas
    //
    //k=ceil(log_10(2^(alpha-e-1)))
    //=ceil((alpha-e-1)*log_10(2))
    //
    //Fromthepaper:
    //"Intheorytheresultoftheprocedurecouldbewrongsincecisrounded,
    //andthecomputationitselfisapproximated[...].Inpractice,however,
    //thissimplefunctionissufficient."
    //
    //ForIEEEdoubleprecisionfloating-pointnumbersconvertedinto
    //normalizeddiyfp'sw=f*2^e,withq=64,
    //
    //e>=-1022(minIEEEexponent)
    //-52(p-1)
    //-52(p-1,possiblynormalizedenormalIEEEnumbers)
    //-11(normalizethediyfp)
    //=-1137
    //
    //and
    //
    //e<=+1023(maxIEEEexponent)
    //-52(p-1)
    //-11(normalizethediyfp)
    //=960
    //
    //Thisbinaryexponentrange[-1137,960]resultsinadecimalexponent
    //range[-307,324].Onedoesnotneedtostoreacachedpowerforeach
    //kinthisrange.Foreachsuchkitsufficestofindacachedpower
    //suchthattheexponentoftheproductliesin[alpha,gamma].
    //Thisimpliesthatthedifferenceofthedecimalexponentsofadjacent
    //tableentriesmustbelessthanorequalto
    //
    //floor((gamma-alpha)*log_10(2))=8.
    //
    //(Asmallerdistancegamma-alphawouldrequirealargertable.)

    //NB:
    //Actuallythisfunctionreturnsc,suchthat-60<=e_c+e+64<=-34.

    constexprintkCachedPowersMinDecExp=-300;
    constexprintkCachedPowersDecStep=8;

    staticconstexprstd::array<cached_power,79>kCachedPowers=
    {
    {
    {0xAB70FE17C79AC6CA,-1060,-300},
    {0xFF77B1FCBEBCDC4F,-1034,-292},
    {0xBE5691EF416BD60C,-1007,-284},
    {0x8DD01FAD907FFC3C,-980,-276},
    {0xD3515C2831559A83,-954,-268},
    {0x9D71AC8FADA6C9B5,-927,-260},
    {0xEA9C227723EE8BCB,-901,-252},
    {0xAECC49914078536D,-874,-244},
    {0x823C12795DB6CE57,-847,-236},
    {0xC21094364DFB5637,-821,-228},
    {0x9096EA6F3848984F,-794,-220},
    {0xD77485CB25823AC7,-768,-212},
    {0xA086CFCD97BF97F4,-741,-204},
    {0xEF340A98172AACE5,-715,-196},
    {0xB23867FB2A35B28E,-688,-188},
    {0x84C8D4DFD2C63F3B,-661,-180},
    {0xC5DD44271AD3CDBA,-635,-172},
    {0x936B9FCEBB25C996,-608,-164},
    {0xDBAC6C247D62A584,-582,-156},
    {0xA3AB66580D5FDAF6,-555,-148},
    {0xF3E2F893DEC3F126,-529,-140},
    {0xB5B5ADA8AAFF80B8,-502,-132},
    {0x87625F056C7C4A8B,-475,-124},
    {0xC9BCFF6034C13053,-449,-116},
    {0x964E858C91BA2655,-422,-108},
    {0xDFF9772470297EBD,-396,-100},
    {0xA6DFBD9FB8E5B88F,-369,-92},
    {0xF8A95FCF88747D94,-343,-84},
    {0xB94470938FA89BCF,-316,-76},
    {0x8A08F0F8BF0F156B,-289,-68},
    {0xCDB02555653131B6,-263,-60},
    {0x993FE2C6D07B7FAC,-236,-52},
    {0xE45C10C42A2B3B06,-210,-44},
    {0xAA242499697392D3,-183,-36},
    {0xFD87B5F28300CA0E,-157,-28},
    {0xBCE5086492111AEB,-130,-20},
    {0x8CBCCC096F5088CC,-103,-12},
    {0xD1B71758E219652C,-77,-4},
    {0x9C40000000000000,-50,4},
    {0xE8D4A51000000000,-24,12},
    {0xAD78EBC5AC620000,3,20},
    {0x813F3978F8940984,30,28},
    {0xC097CE7BC90715B3,56,36},
    {0x8F7E32CE7BEA5C70,83,44},
    {0xD5D238A4ABE98068,109,52},
    {0x9F4F2726179A2245,136,60},
    {0xED63A231D4C4FB27,162,68},
    {0xB0DE65388CC8ADA8,189,76},
    {0x83C7088E1AAB65DB,216,84},
    {0xC45D1DF942711D9A,242,92},
    {0x924D692CA61BE758,269,100},
    {0xDA01EE641A708DEA,295,108},
    {0xA26DA3999AEF774A,322,116},
    {0xF209787BB47D6B85,348,124},
    {0xB454E4A179DD1877,375,132},
    {0x865B86925B9BC5C2,402,140},
    {0xC83553C5C8965D3D,428,148},
    {0x952AB45CFA97A0B3,455,156},
    {0xDE469FBD99A05FE3,481,164},
    {0xA59BC234DB398C25,508,172},
    {0xF6C69A72A3989F5C,534,180},
    {0xB7DCBF5354E9BECE,561,188},
    {0x88FCF317F22241E2,588,196},
    {0xCC20CE9BD35C78A5,614,204},
    {0x98165AF37B2153DF,641,212},
    {0xE2A0B5DC971F303A,667,220},
    {0xA8D9D1535CE3B396,694,228},
    {0xFB9B7CD9A4A7443C,720,236},
    {0xBB764C4CA7A44410,747,244},
    {0x8BAB8EEFB6409C1A,774,252},
    {0xD01FEF10A657842C,800,260},
    {0x9B10A4E5E9913129,827,268},
    {0xE7109BFBA19C0C9D,853,276},
    {0xAC2820D9623BF429,880,284},
    {0x80444B5E7AA7CF85,907,292},
    {0xBF21E44003ACDD2D,933,300},
    {0x8E679C2F5E44FF8F,960,308},
    {0xD433179D9C8CB841,986,316},
    {0x9E19DB92B4E31BA9,1013,324},
    }
    };

    //Thiscomputationgivesexactlythesameresultsforkas
    //k=ceil((kAlpha-e-1)*0.30102999566398114)
    //for|e|<=1500,butdoesn'trequirefloating-pointoperations.
    //NB:log_10(2)~=78913/2^18
    JSON_ASSERT(e>=-1500);
    JSON_ASSERT(e<=1500);
    constintf=kAlpha-e-1;
    constintk=(f*78913)/(1<<18)+static_cast<int>(f>0);

    constintindex=(-kCachedPowersMinDecExp+k+(kCachedPowersDecStep-1))/kCachedPowersDecStep;
    JSON_ASSERT(index>=0);
    JSON_ASSERT(static_cast<std::size_t>(index)<kCachedPowers.size());

    constcached_powercached=kCachedPowers[static_cast<std::size_t>(index)];
    JSON_ASSERT(kAlpha<=cached.e+e+64);
    JSON_ASSERT(kGamma>=cached.e+e+64);

    returncached;
    }

    inlineintfind_largest_pow10(conststd::uint32_tn,std::uint32_t&pow10)
    {
    //LCOV_EXCL_START
    if(n>=1000000000)
    {
    pow10=1000000000;
    return10;
    }
    //LCOV_EXCL_STOP
    if(n>=100000000)
    {
    pow10=100000000;
    return9;
    }
    if(n>=10000000)
    {
    pow10=10000000;
    return8;
    }
    if(n>=1000000)
    {
    pow10=1000000;
    return7;
    }
    if(n>=100000)
    {
    pow10=100000;
    return6;
    }
    if(n>=10000)
    {
    pow10=10000;
    return5;
    }
    if(n>=1000)
    {
    pow10=1000;
    return4;
    }
    if(n>=100)
    {
    pow10=100;
    return3;
    }
    if(n>=10)
    {
    pow10=10;
    return2;
    }

    pow10=1;
    return1;
    }

    inlinevoidgrisu2_round(char*buf,intlen,std::uint64_tdist,std::uint64_tdelta,
    std::uint64_trest,std::uint64_tten_k)
    {
    JSON_ASSERT(len>=1);
    JSON_ASSERT(dist<=delta);
    JSON_ASSERT(rest<=delta);
    JSON_ASSERT(ten_k>0);

    //<---------------------------delta---->
    //<----dist--------->
    //--------------[------------------+-------------------]--------------
    //M-wM+
    //
    //ten_k
    //<------>
    //<----rest---->
    //--------------[------------------+----+--------------]--------------
    //wV
    //=buf*10^k
    //
    //ten_krepresentsaunit-in-the-last-placeinthedecimalrepresentation
    //storedinbuf.
    //Decrementbufbyten_kwhilethistakesbufclosertow.

    //Thetestsarewritteninthisordertoavoidoverflowinunsigned
    //integerarithmetic.

    while(rest<dist
    &&delta-rest>=ten_k
    &&(rest+ten_k<dist||dist-rest>rest+ten_k-dist))
    {
    JSON_ASSERT(buf[len-1]!='0');
    buf[len-1]--;
    rest+=ten_k;
    }
    }

    inlinevoidgrisu2_digit_gen(char*buffer,int&length,int&decimal_exponent,
    diyfpM_minus,diyfpw,diyfpM_plus)
    {
    static_assert(kAlpha>=-60,"internalerror");
    static_assert(kGamma<=-32,"internalerror");

    //Generatesthedigits(andtheexponent)ofadecimalfloating-point
    //numberV=buffer*10^decimal_exponentintherange[M-,M+].Thediyfp's
    //w,M-andM+sharethesameexponente,whichsatisfiesalpha<=e<=gamma.
    //
    //<---------------------------delta---->
    //<----dist--------->
    //--------------[------------------+-------------------]--------------
    //M-wM+
    //
    //Grisu2generatesthedigitsofM+fromlefttorightandstopsassoonas
    //Visin[M-,M+].

    JSON_ASSERT(M_plus.e>=kAlpha);
    JSON_ASSERT(M_plus.e<=kGamma);

    std::uint64_tdelta=diyfp::sub(M_plus,M_minus).f;//(significandof(M+-M-),implicitexponentise)
    std::uint64_tdist=diyfp::sub(M_plus,w).f;//(significandof(M+-w),implicitexponentise)

    //SplitM+=f*2^eintotwopartsp1andp2(note:e<0):
    //
    //M+=f*2^e
    //=((fdiv2^-e)*2^-e+(fmod2^-e))*2^e
    //=((p1)*2^-e+(p2))*2^e
    //=p1+p2*2^e

    constdiyfpone(std::uint64_t{1}<<-M_plus.e,M_plus.e);

    autop1=static_cast<std::uint32_t>(M_plus.f>>-one.e);//p1=fdiv2^-e(Since-e>=32,p1fitsintoa32-bitint.)
    std::uint64_tp2=M_plus.f&(one.f-1);//p2=fmod2^-e

    //1)
    //
    //Generatethedigitsoftheintegralpartp1=d[n-1]...d[1]d[0]

    JSON_ASSERT(p1>0);

    std::uint32_tpow10{};
    constintk=find_largest_pow10(p1,pow10);

    //10^(k-1)<=p1<10^k,pow10=10^(k-1)
    //
    //p1=(p1div10^(k-1))*10^(k-1)+(p1mod10^(k-1))
    //=(d[k-1])*10^(k-1)+(p1mod10^(k-1))
    //
    //M+=p1+p2*2^e
    //=d[k-1]*10^(k-1)+(p1mod10^(k-1))+p2*2^e
    //=d[k-1]*10^(k-1)+((p1mod10^(k-1))*2^-e+p2)*2^e
    //=d[k-1]*10^(k-1)+(rest)*2^e
    //
    //Nowgeneratethedigitsd[n]ofp1fromlefttoright(n=k-1,...,0)
    //
    //p1=d[k-1]...d[n]*10^n+d[n-1]...d[0]
    //
    //butstopassoonas
    //
    //rest*2^e=(d[n-1]...d[0]*2^-e+p2)*2^e<=delta*2^e

    intn=k;
    while(n>0)
    {
    //Invariants:
    //M+=buffer*10^n+(p1+p2*2^e)(buffer=0forn=k)
    //pow10=10^(n-1)<=p1<10^n
    //
    conststd::uint32_td=p1/pow10;//d=p1div10^(n-1)
    conststd::uint32_tr=p1%pow10;//r=p1mod10^(n-1)
    //
    //M+=buffer*10^n+(d*10^(n-1)+r)+p2*2^e
    //=(buffer*10+d)*10^(n-1)+(r+p2*2^e)
    //
    JSON_ASSERT(d<=9);
    buffer[length++]=static_cast<char>('0'+d);//buffer:=buffer*10+d
    //
    //M+=buffer*10^(n-1)+(r+p2*2^e)
    //
    p1=r;
    n--;
    //
    //M+=buffer*10^n+(p1+p2*2^e)
    //pow10=10^n
    //

    //Nowcheckifenoughdigitshavebeengenerated.
    //Compute
    //
    //p1+p2*2^e=(p1*2^-e+p2)*2^e=rest*2^e
    //
    //Note:
    //Sincerestanddeltasharethesameexponente,itsufficesto
    //comparethesignificands.
    conststd::uint64_trest=(std::uint64_t{p1}<<-one.e)+p2;
    if(rest<=delta)
    {
    //V=buffer*10^n,withM-<=V<=M+.

    decimal_exponent+=n;

    //Wemaynowjuststop.Butinsteadlookifthebuffercouldbe
    //decrementedtobringVclosertow.
    //
    //pow10=10^nisnow1ulpinthedecimalrepresentationV.
    //Theroundingprocedureworkswithdiyfp'swithanimplicit
    //exponentofe.
    //
    //10^n=(10^n*2^-e)*2^e=ulp*2^e
    //
    conststd::uint64_tten_n=std::uint64_t{pow10}<<-one.e;
    grisu2_round(buffer,length,dist,delta,rest,ten_n);

    return;
    }

    pow10/=10;
    //
    //pow10=10^(n-1)<=p1<10^n
    //Invariantsrestored.
    }

    //2)
    //
    //Thedigitsoftheintegralparthavebeengenerated:
    //
    //M+=d[k-1]...d[1]d[0]+p2*2^e
    //=buffer+p2*2^e
    //
    //Nowgeneratethedigitsofthefractionalpartp2*2^e.
    //
    //Note:
    //Nodecimalpointisgenerated:theexponentisadjustedinstead.
    //
    //p2actuallyrepresentsthefraction
    //
    //p2*2^e
    //=p2/2^-e
    //=d[-1]/10^1+d[-2]/10^2+...
    //
    //Nowgeneratethedigitsd[-m]ofp1fromlefttoright(m=1,2,...)
    //
    //p2*2^e=d[-1]d[-2]...d[-m]*10^-m
    //+10^-m*(d[-m-1]/10^1+d[-m-2]/10^2+...)
    //
    //using
    //
    //10^m*p2=((10^m*p2)div2^-e)*2^-e+((10^m*p2)mod2^-e)
    //=(d)*2^-e+(r)
    //
    //or
    //10^m*p2*2^e=d+r*2^e
    //
    //i.e.
    //
    //M+=buffer+p2*2^e
    //=buffer+10^-m*(d+r*2^e)
    //=(buffer*10^m+d)*10^-m+10^-m*r*2^e
    //
    //andstopassoonas10^-m*r*2^e<=delta*2^e

    JSON_ASSERT(p2>delta);

    intm=0;
    for(;;)
    {
    //Invariant:
    //M+=buffer*10^-m+10^-m*(d[-m-1]/10+d[-m-2]/10^2+...)*2^e
    //=buffer*10^-m+10^-m*(p2)*2^e
    //=buffer*10^-m+10^-m*(1/10*(10*p2))*2^e
    //=buffer*10^-m+10^-m*(1/10*((10*p2div2^-e)*2^-e+(10*p2mod2^-e))*2^e
    //
    JSON_ASSERT(p2<=(std::numeric_limits<std::uint64_t>::max)()/10);
    p2*=10;
    conststd::uint64_td=p2>>-one.e;//d=(10*p2)div2^-e
    conststd::uint64_tr=p2&(one.f-1);//r=(10*p2)mod2^-e
    //
    //M+=buffer*10^-m+10^-m*(1/10*(d*2^-e+r)*2^e
    //=buffer*10^-m+10^-m*(1/10*(d+r*2^e))
    //=(buffer*10+d)*10^(-m-1)+10^(-m-1)*r*2^e
    //
    JSON_ASSERT(d<=9);
    buffer[length++]=static_cast<char>('0'+d);//buffer:=buffer*10+d
    //
    //M+=buffer*10^(-m-1)+10^(-m-1)*r*2^e
    //
    p2=r;
    m++;
    //
    //M+=buffer*10^-m+10^-m*p2*2^e
    //Invariantrestored.

    //Checkifenoughdigitshavebeengenerated.
    //
    //10^-m*p2*2^e<=delta*2^e
    //p2*2^e<=10^m*delta*2^e
    //p2<=10^m*delta
    delta*=10;
    dist*=10;
    if(p2<=delta)
    {
    break;
    }
    }

    //V=buffer*10^-m,withM-<=V<=M+.

    decimal_exponent-=m;

    //1ulpinthedecimalrepresentationisnow10^-m.
    //Sincedeltaanddistarenowscaledby10^m,weneedtodothe
    //samewithulpinordertokeeptheunitsinsync.
    //
    //10^m*10^-m=1=2^-e*2^e=ten_m*2^e
    //
    conststd::uint64_tten_m=one.f;
    grisu2_round(buffer,length,dist,delta,p2,ten_m);

    //Byconstructionthisalgorithmgeneratestheshortestpossibledecimal
    //number(Loitsch,Theorem6.2)whichroundsbacktow.
    //Foraninputnumberofprecisionp,atleast
    //
    //N=1+ceil(p*log_10(2))
    //
    //decimaldigitsaresufficienttoidentifyallbinaryfloating-point
    //numbers(Matula,"In-and-Outconversions").
    //ThisimpliesthatthealgorithmdoesnotproducemorethanNdecimal
    //digits.
    //
    //N=17forp=53(IEEEdoubleprecision)
    //N=9forp=24(IEEEsingleprecision)
    }

    JSON_HEDLEY_NON_NULL(1)
    inlinevoidgrisu2(char*buf,int&len,int&decimal_exponent,
    diyfpm_minus,diyfpv,diyfpm_plus)
    {
    JSON_ASSERT(m_plus.e==m_minus.e);
    JSON_ASSERT(m_plus.e==v.e);

    //--------(-----------------------+-----------------------)--------(A)
    //m-vm+
    //
    //--------------------(-----------+-----------------------)--------(B)
    //m-vm+
    //
    //Firstscalev(andm-andm+)suchthattheexponentisintherange
    //[alpha,gamma].

    constcached_powercached=get_cached_power_for_binary_exponent(m_plus.e);

    constdiyfpc_minus_k(cached.f,cached.e);//=c~=10^-k

    //Theexponentoftheproductsis=v.e+c_minus_k.e+qandisintherange[alpha,gamma]
    constdiyfpw=diyfp::mul(v,c_minus_k);
    constdiyfpw_minus=diyfp::mul(m_minus,c_minus_k);
    constdiyfpw_plus=diyfp::mul(m_plus,c_minus_k);

    //----(---+---)---------------(---+---)---------------(---+---)----
    //w-ww+
    //=c*m-=c*v=c*m+
    //
    //diyfp::mulroundsitsresultandc_minus_kisapproximatedtoo.w,w-and
    //w+arenowoffbyasmallamount.
    //Infact:
    //
    //w-v*10^k<1ulp
    //
    //Toaccountforthisinaccuracy,addresp.subtract1ulp.
    //
    //--------+---[---------------(---+---)---------------]---+--------
    //w-M-wM+w+
    //
    //Nowanynumberin[M-,M+](boundsincluded)willroundtowwheninput,
    //regardlessofhowtheinputroundingalgorithmbreaksties.
    //
    //Anddigit_gengeneratestheshortestpossiblesuchnumberin[M-,M+].
    //NotethatthisdoesnotmeanthatGrisu2alwaysgeneratestheshortest
    //possiblenumberintheinterval(m-,m+).
    constdiyfpM_minus(w_minus.f+1,w_minus.e);
    constdiyfpM_plus(w_plus.f-1,w_plus.e);

    decimal_exponent=-cached.k;//=-(-k)=k

    grisu2_digit_gen(buf,len,decimal_exponent,M_minus,w,M_plus);
    }

    template<typenameFloatType>
    JSON_HEDLEY_NON_NULL(1)
    voidgrisu2(char*buf,int&len,int&decimal_exponent,FloatTypevalue)
    {
    static_assert(diyfp::kPrecision>=std::numeric_limits<FloatType>::digits+3,
    "internalerror:notenoughprecision");

    JSON_ASSERT(std::isfinite(value));
    JSON_ASSERT(value>0);

    //Iftheneighbors(andboundaries)of'value'arealwayscomputedfordouble-precision
    //numbers,allfloat'scanberecoveredusingstrtod(andstrtof).However,theresulting
    //decimalrepresentationsarenotexactly"short".
    //
    //Thedocumentationfor'std::to_chars'(https://en.cppreference.com/w/cpp/utility/to_chars)
    //says"valueisconvertedtoastringasifbystd::sprintfinthedefault("C")locale"
    //andsincesprintfpromotesfloat'stodouble's,Ithinkthisisexactlywhat'std::to_chars'
    //does.
    //Ontheotherhand,thedocumentationfor'std::to_chars'requiresthat"parsingthe
    //representationusingthecorrespondingstd::from_charsfunctionrecoversvalueexactly".That
    //indicatesthatsingleprecisionfloating-pointnumbersshouldberecoveredusing
    //'std::strtof'.
    //
    //NB:Iftheneighborsarecomputedforsingle-precisionnumbers,thereisasinglefloat
    //(7.0385307e-26f)whichcan'tberecoveredusingstrtod.Theresultingdoubleprecision
    //valueisoffby1ulp.
    #if0
    constboundariesw=compute_boundaries(static_cast<double>(value));
    #else
    constboundariesw=compute_boundaries(value);
    #endif

    grisu2(buf,len,decimal_exponent,w.minus,w.w,w.plus);
    }

    JSON_HEDLEY_NON_NULL(1)
    JSON_HEDLEY_RETURNS_NON_NULL
    inlinechar*append_exponent(char*buf,inte)
    {
    JSON_ASSERT(e>-1000);
    JSON_ASSERT(e<1000);

    if(e<0)
    {
    e=-e;
    *buf++='-';
    }
    else
    {
    *buf++='+';
    }

    autok=static_cast<std::uint32_t>(e);
    if(k<10)
    {
    //Alwaysprintatleasttwodigitsintheexponent.
    //Thisisforcompatibilitywithprintf("%g").
    *buf++='0';
    *buf++=static_cast<char>('0'+k);
    }
    elseif(k<100)
    {
    *buf++=static_cast<char>('0'+k/10);
    k%=10;
    *buf++=static_cast<char>('0'+k);
    }
    else
    {
    *buf++=static_cast<char>('0'+k/100);
    k%=100;
    *buf++=static_cast<char>('0'+k/10);
    k%=10;
    *buf++=static_cast<char>('0'+k);
    }

    returnbuf;
    }

    JSON_HEDLEY_NON_NULL(1)
    JSON_HEDLEY_RETURNS_NON_NULL
    inlinechar*format_buffer(char*buf,intlen,intdecimal_exponent,
    intmin_exp,intmax_exp)
    {
    JSON_ASSERT(min_exp<0);
    JSON_ASSERT(max_exp>0);

    constintk=len;
    constintn=len+decimal_exponent;

    //v=buf*10^(n-k)
    //kisthelengthofthebuffer(numberofdecimaldigits)
    //nisthepositionofthedecimalpointrelativetothestartofthebuffer.

    if(k<=n&&n<=max_exp)
    {
    //digits[000]
    //len<=max_exp+2

    std::memset(buf+k,'0',static_cast<size_t>(n)-static_cast<size_t>(k));
    //Makeitlooklikeafloating-pointnumber(#362,#378)
    buf[n+0]='.';
    buf[n+1]='0';
    returnbuf+(static_cast<size_t>(n)+2);
    }

    if(0<n&&n<=max_exp)
    {
    //dig.its
    //len<=max_digits10+1

    JSON_ASSERT(k>n);

    std::memmove(buf+(static_cast<size_t>(n)+1),buf+n,static_cast<size_t>(k)-static_cast<size_t>(n));
    buf[n]='.';
    returnbuf+(static_cast<size_t>(k)+1U);
    }

    if(min_exp<n&&n<=0)
    {
    //0.[000]digits
    //len<=2+(-min_exp-1)+max_digits10

    std::memmove(buf+(2+static_cast<size_t>(-n)),buf,static_cast<size_t>(k));
    buf[0]='0';
    buf[1]='.';
    std::memset(buf+2,'0',static_cast<size_t>(-n));
    returnbuf+(2U+static_cast<size_t>(-n)+static_cast<size_t>(k));
    }

    if(k==1)
    {
    //dE+123
    //len<=1+5

    buf+=1;
    }
    else
    {
    //d.igitsE+123
    //len<=max_digits10+1+5

    std::memmove(buf+2,buf+1,static_cast<size_t>(k)-1);
    buf[1]='.';
    buf+=1+static_cast<size_t>(k);
    }

    *buf++='e';
    returnappend_exponent(buf,n-1);
    }

    }//namespacedtoa_impl

    template<typenameFloatType>
    JSON_HEDLEY_NON_NULL(1,2)
    JSON_HEDLEY_RETURNS_NON_NULL
    char*to_chars(char*first,constchar*last,FloatTypevalue)
    {
    static_cast<void>(last);//maybeunused-fixwarning
    JSON_ASSERT(std::isfinite(value));

    //Usesignbit(value)insteadof(value<0)sincesignbitworksfor-0.
    if(std::signbit(value))
    {
    value=-value;
    *first++='-';
    }

    if(value==0)//+-0
    {
    *first++='0';
    //Makeitlooklikeafloating-pointnumber(#362,#378)
    *first++='.';
    *first++='0';
    returnfirst;
    }

    JSON_ASSERT(last-first>=std::numeric_limits<FloatType>::max_digits10);

    //Computev=buffer*10^decimal_exponent.
    //Thedecimaldigitsarestoredinthebuffer,whichneedstobeinterpreted
    //asanunsigneddecimalinteger.
    //lenisthelengthofthebuffer,i.e.thenumberofdecimaldigits.
    intlen=0;
    intdecimal_exponent=0;
    dtoa_impl::grisu2(first,len,decimal_exponent,value);

    JSON_ASSERT(len<=std::numeric_limits<FloatType>::max_digits10);

    //Formatthebufferlikeprintf("%.*g",prec,value)
    constexprintkMinExp=-4;
    //Usedigits10heretoincreasecompatibilitywithversion2.
    constexprintkMaxExp=std::numeric_limits<FloatType>::digits10;

    JSON_ASSERT(last-first>=kMaxExp+2);
    JSON_ASSERT(last-first>=2+(-kMinExp-1)+std::numeric_limits<FloatType>::max_digits10);
    JSON_ASSERT(last-first>=std::numeric_limits<FloatType>::max_digits10+6);

    returndtoa_impl::format_buffer(first,len,decimal_exponent,kMinExp,kMaxExp);
    }

    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/exceptions.hpp>

    //#include<nlohmann/detail/macro_scope.hpp>

    //#include<nlohmann/detail/meta/cpp_future.hpp>

    //#include<nlohmann/detail/output/binary_writer.hpp>

    //#include<nlohmann/detail/output/output_adapters.hpp>

    //#include<nlohmann/detail/value_t.hpp>

    namespacenlohmann
    {
    namespacedetail
    {
    //serialization//

    enumclasserror_handler_t
    {
    strict,
    replace,
    ignore
    };

    template<typenameBasicJsonType>
    classserializer
    {
    usingstring_t=typenameBasicJsonType::string_t;
    usingnumber_float_t=typenameBasicJsonType::number_float_t;
    usingnumber_integer_t=typenameBasicJsonType::number_integer_t;
    usingnumber_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingbinary_char_t=typenameBasicJsonType::binary_t::value_type;
    staticconstexprstd::uint8_tUTF8_ACCEPT=0;
    staticconstexprstd::uint8_tUTF8_REJECT=1;

    public:
    serializer(output_adapter_t<char>s,constcharichar,
    error_handler_terror_handler_=error_handler_t::strict)
    :o(std::move(s))
    ,loc(std::localeconv())
    ,thousands_sep(loc->thousands_sep==nullptr?'\0':std::char_traits<char>::to_char_type(*(loc->thousands_sep)))
    ,decimal_point(loc->decimal_point==nullptr?'\0':std::char_traits<char>::to_char_type(*(loc->decimal_point)))
    ,indent_char(ichar)
    ,indent_string(512,indent_char)
    ,error_handler(error_handler_)
    {}

    //deletebecauseofpointermembers
    serializer(constserializer&)=delete;
    serializer&operator=(constserializer&)=delete;
    serializer(serializer&&)=delete;
    serializer&operator=(serializer&&)=delete;
    ~serializer()=default;

    voiddump(constBasicJsonType&val,
    constboolpretty_print,
    constboolensure_ascii,
    constunsignedintindent_step,
    constunsignedintcurrent_indent=0)
    {
    switch(val.m_type)
    {
    casevalue_t::object:
    {
    if(val.m_value.object->empty())
    {
    o->write_characters("{}",2);
    return;
    }

    if(pretty_print)
    {
    o->write_characters("{\n",2);

    //variabletoholdindentationforrecursivecalls
    constautonew_indent=current_indent+indent_step;
    if(JSON_HEDLEY_UNLIKELY(indent_string.size()<new_indent))
    {
    indent_string.resize(indent_string.size()*2,'');
    }

    //firstn-1elements
    autoi=val.m_value.object->cbegin();
    for(std::size_tcnt=0;cnt<val.m_value.object->size()-1;++cnt,++i)
    {
    o->write_characters(indent_string.c_str(),new_indent);
    o->write_character('\"');
    dump_escaped(i->first,ensure_ascii);
    o->write_characters("\":",3);
    dump(i->second,true,ensure_ascii,indent_step,new_indent);
    o->write_characters(",\n",2);
    }

    //lastelement
    JSON_ASSERT(i!=val.m_value.object->cend());
    JSON_ASSERT(std::next(i)==val.m_value.object->cend());
    o->write_characters(indent_string.c_str(),new_indent);
    o->write_character('\"');
    dump_escaped(i->first,ensure_ascii);
    o->write_characters("\":",3);
    dump(i->second,true,ensure_ascii,indent_step,new_indent);

    o->write_character('\n');
    o->write_characters(indent_string.c_str(),current_indent);
    o->write_character('}');
    }
    else
    {
    o->write_character('{');

    //firstn-1elements
    autoi=val.m_value.object->cbegin();
    for(std::size_tcnt=0;cnt<val.m_value.object->size()-1;++cnt,++i)
    {
    o->write_character('\"');
    dump_escaped(i->first,ensure_ascii);
    o->write_characters("\":",2);
    dump(i->second,false,ensure_ascii,indent_step,current_indent);
    o->write_character(',');
    }

    //lastelement
    JSON_ASSERT(i!=val.m_value.object->cend());
    JSON_ASSERT(std::next(i)==val.m_value.object->cend());
    o->write_character('\"');
    dump_escaped(i->first,ensure_ascii);
    o->write_characters("\":",2);
    dump(i->second,false,ensure_ascii,indent_step,current_indent);

    o->write_character('}');
    }

    return;
    }

    casevalue_t::array:
    {
    if(val.m_value.array->empty())
    {
    o->write_characters("[]",2);
    return;
    }

    if(pretty_print)
    {
    o->write_characters("[\n",2);

    //variabletoholdindentationforrecursivecalls
    constautonew_indent=current_indent+indent_step;
    if(JSON_HEDLEY_UNLIKELY(indent_string.size()<new_indent))
    {
    indent_string.resize(indent_string.size()*2,'');
    }

    //firstn-1elements
    for(autoi=val.m_value.array->cbegin();
    i!=val.m_value.array->cend()-1;++i)
    {
    o->write_characters(indent_string.c_str(),new_indent);
    dump(*i,true,ensure_ascii,indent_step,new_indent);
    o->write_characters(",\n",2);
    }

    //lastelement
    JSON_ASSERT(!val.m_value.array->empty());
    o->write_characters(indent_string.c_str(),new_indent);
    dump(val.m_value.array->back(),true,ensure_ascii,indent_step,new_indent);

    o->write_character('\n');
    o->write_characters(indent_string.c_str(),current_indent);
    o->write_character(']');
    }
    else
    {
    o->write_character('[');

    //firstn-1elements
    for(autoi=val.m_value.array->cbegin();
    i!=val.m_value.array->cend()-1;++i)
    {
    dump(*i,false,ensure_ascii,indent_step,current_indent);
    o->write_character(',');
    }

    //lastelement
    JSON_ASSERT(!val.m_value.array->empty());
    dump(val.m_value.array->back(),false,ensure_ascii,indent_step,current_indent);

    o->write_character(']');
    }

    return;
    }

    casevalue_t::string:
    {
    o->write_character('\"');
    dump_escaped(*val.m_value.string,ensure_ascii);
    o->write_character('\"');
    return;
    }

    casevalue_t::binary:
    {
    if(pretty_print)
    {
    o->write_characters("{\n",2);

    //variabletoholdindentationforrecursivecalls
    constautonew_indent=current_indent+indent_step;
    if(JSON_HEDLEY_UNLIKELY(indent_string.size()<new_indent))
    {
    indent_string.resize(indent_string.size()*2,'');
    }

    o->write_characters(indent_string.c_str(),new_indent);

    o->write_characters("\"bytes\":[",10);

    if(!val.m_value.binary->empty())
    {
    for(autoi=val.m_value.binary->cbegin();
    i!=val.m_value.binary->cend()-1;++i)
    {
    dump_integer(*i);
    o->write_characters(",",2);
    }
    dump_integer(val.m_value.binary->back());
    }

    o->write_characters("],\n",3);
    o->write_characters(indent_string.c_str(),new_indent);

    o->write_characters("\"subtype\":",11);
    if(val.m_value.binary->has_subtype())
    {
    dump_integer(val.m_value.binary->subtype());
    }
    else
    {
    o->write_characters("null",4);
    }
    o->write_character('\n');
    o->write_characters(indent_string.c_str(),current_indent);
    o->write_character('}');
    }
    else
    {
    o->write_characters("{\"bytes\":[",10);

    if(!val.m_value.binary->empty())
    {
    for(autoi=val.m_value.binary->cbegin();
    i!=val.m_value.binary->cend()-1;++i)
    {
    dump_integer(*i);
    o->write_character(',');
    }
    dump_integer(val.m_value.binary->back());
    }

    o->write_characters("],\"subtype\":",12);
    if(val.m_value.binary->has_subtype())
    {
    dump_integer(val.m_value.binary->subtype());
    o->write_character('}');
    }
    else
    {
    o->write_characters("null}",5);
    }
    }
    return;
    }

    casevalue_t::boolean:
    {
    if(val.m_value.boolean)
    {
    o->write_characters("true",4);
    }
    else
    {
    o->write_characters("false",5);
    }
    return;
    }

    casevalue_t::number_integer:
    {
    dump_integer(val.m_value.number_integer);
    return;
    }

    casevalue_t::number_unsigned:
    {
    dump_integer(val.m_value.number_unsigned);
    return;
    }

    casevalue_t::number_float:
    {
    dump_float(val.m_value.number_float);
    return;
    }

    casevalue_t::discarded:
    {
    o->write_characters("<discarded>",11);
    return;
    }

    casevalue_t::null:
    {
    o->write_characters("null",4);
    return;
    }

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }
    }

    JSON_PRIVATE_UNLESS_TESTED:
    voiddump_escaped(conststring_t&s,constboolensure_ascii)
    {
    std::uint32_tcodepoint{};
    std::uint8_tstate=UTF8_ACCEPT;
    std::size_tbytes=0;//numberofbyteswrittentostring_buffer

    //numberofbyteswrittenatthepointofthelastvalidbyte
    std::size_tbytes_after_last_accept=0;
    std::size_tundumped_chars=0;

    for(std::size_ti=0;i<s.size();++i)
    {
    constautobyte=static_cast<uint8_t>(s[i]);

    switch(decode(state,codepoint,byte))
    {
    caseUTF8_ACCEPT://decodefoundanewcodepoint
    {
    switch(codepoint)
    {
    case0x08://backspace
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='b';
    break;
    }

    case0x09://horizontaltab
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='t';
    break;
    }

    case0x0A://newline
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='n';
    break;
    }

    case0x0C://formfeed
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='f';
    break;
    }

    case0x0D://carriagereturn
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='r';
    break;
    }

    case0x22://quotationmark
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='\"';
    break;
    }

    case0x5C://reversesolidus
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='\\';
    break;
    }

    default:
    {
    //escapecontrolcharacters(0x00..0x1F)or,if
    //ensure_asciiparameterisused,non-ASCIIcharacters
    if((codepoint<=0x1F)||(ensure_ascii&&(codepoint>=0x7F)))
    {
    if(codepoint<=0xFFFF)
    {
    //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    (std::snprintf)(string_buffer.data()+bytes,7,"\\u%04x",
    static_cast<std::uint16_t>(codepoint));
    bytes+=6;
    }
    else
    {
    //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    (std::snprintf)(string_buffer.data()+bytes,13,"\\u%04x\\u%04x",
    static_cast<std::uint16_t>(0xD7C0u+(codepoint>>10u)),
    static_cast<std::uint16_t>(0xDC00u+(codepoint&0x3FFu)));
    bytes+=12;
    }
    }
    else
    {
    //copybytetobuffer(allpreviousbytes
    //beencopiedhaveindefaultcaseabove)
    string_buffer[bytes++]=s[i];
    }
    break;
    }
    }

    //writebufferandresetindex;theremustbe13bytes
    //left,asthisisthemaximalnumberofbytestobe
    //written("\uxxxx\uxxxx\0")foronecodepoint
    if(string_buffer.size()-bytes<13)
    {
    o->write_characters(string_buffer.data(),bytes);
    bytes=0;
    }

    //rememberthebytepositionofthisaccept
    bytes_after_last_accept=bytes;
    undumped_chars=0;
    break;
    }

    caseUTF8_REJECT://decodefoundinvalidUTF-8byte
    {
    switch(error_handler)
    {
    caseerror_handler_t::strict:
    {
    std::stringsn(3,'\0');
    //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    (std::snprintf)(&sn[0],sn.size(),"%.2X",byte);
    JSON_THROW(type_error::create(316,"invalidUTF-8byteatindex"+std::to_string(i)+":0x"+sn,BasicJsonType()));
    }

    caseerror_handler_t::ignore:
    caseerror_handler_t::replace:
    {
    //incasewesawthischaracterthefirsttime,we
    //wouldliketoreaditagain,becausethebyte
    //maybeOKforitself,butjustnotOKforthe
    //previoussequence
    if(undumped_chars>0)
    {
    --i;
    }

    //resetlengthbuffertothelastacceptedindex;
    //thusremoving/ignoringtheinvalidcharacters
    bytes=bytes_after_last_accept;

    if(error_handler==error_handler_t::replace)
    {
    //addareplacementcharacter
    if(ensure_ascii)
    {
    string_buffer[bytes++]='\\';
    string_buffer[bytes++]='u';
    string_buffer[bytes++]='f';
    string_buffer[bytes++]='f';
    string_buffer[bytes++]='f';
    string_buffer[bytes++]='d';
    }
    else
    {
    string_buffer[bytes++]=detail::binary_writer<BasicJsonType, char>::to_char_type('\xEF');
    string_buffer[bytes++]=detail::binary_writer<BasicJsonType, char>::to_char_type('\xBF');
    string_buffer[bytes++]=detail::binary_writer<BasicJsonType, char>::to_char_type('\xBD');
    }

    //writebufferandresetindex;theremustbe13bytes
    //left,asthisisthemaximalnumberofbytestobe
    //written("\uxxxx\uxxxx\0")foronecodepoint
    if(string_buffer.size()-bytes<13)
    {
    o->write_characters(string_buffer.data(),bytes);
    bytes=0;
    }

    bytes_after_last_accept=bytes;
    }

    undumped_chars=0;

    //continueprocessingthestring
    state=UTF8_ACCEPT;
    break;
    }

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }
    break;
    }

    default://decodefoundyetincompletemulti-bytecodepoint
    {
    if(!ensure_ascii)
    {
    //codepointwillnotbeescaped-copybytetobuffer
    string_buffer[bytes++]=s[i];
    }
    ++undumped_chars;
    break;
    }
    }
    }

    //wefinishedprocessingthestring
    if(JSON_HEDLEY_LIKELY(state==UTF8_ACCEPT))
    {
    //writebuffer
    if(bytes>0)
    {
    o->write_characters(string_buffer.data(),bytes);
    }
    }
    else
    {
    //wefinishreading,butdonotaccept:stringwasincomplete
    switch(error_handler)
    {
    caseerror_handler_t::strict:
    {
    std::stringsn(3,'\0');
    //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    (std::snprintf)(&sn[0],sn.size(),"%.2X",static_cast<std::uint8_t>(s.back()));
    JSON_THROW(type_error::create(316,"incompleteUTF-8string;lastbyte:0x"+sn,BasicJsonType()));
    }

    caseerror_handler_t::ignore:
    {
    //writeallacceptedbytes
    o->write_characters(string_buffer.data(),bytes_after_last_accept);
    break;
    }

    caseerror_handler_t::replace:
    {
    //writeallacceptedbytes
    o->write_characters(string_buffer.data(),bytes_after_last_accept);
    //addareplacementcharacter
    if(ensure_ascii)
    {
    o->write_characters("\\ufffd",6);
    }
    else
    {
    o->write_characters("\xEF\xBF\xBD",3);
    }
    break;
    }

    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }
    }
    }

    private:
    inlineunsignedintcount_digits(number_unsigned_tx)noexcept
    {
    unsignedintn_digits=1;
    for(;;)
    {
    if(x<10)
    {
    returnn_digits;
    }
    if(x<100)
    {
    returnn_digits+1;
    }
    if(x<1000)
    {
    returnn_digits+2;
    }
    if(x<10000)
    {
    returnn_digits+3;
    }
    x=x/10000u;
    n_digits+=4;
    }
    }

    template<typenameNumberType,detail::enable_if_t<
    std::is_same<NumberType,number_unsigned_t>::value||
    std::is_same<NumberType,number_integer_t>::value||
    std::is_same<NumberType,binary_char_t>::value,
    int>=0>
    voiddump_integer(NumberTypex)
    {
    staticconstexprstd::array<std::array<char,2>,100>digits_to_99
    {
    {
    {{'0','0'}},{{'0','1'}},{{'0','2'}},{{'0','3'}},{{'0','4'}},{{'0','5'}},{{'0','6'}},{{'0','7'}},{{'0','8'}},{{'0','9'}},
    {{'1','0'}},{{'1','1'}},{{'1','2'}},{{'1','3'}},{{'1','4'}},{{'1','5'}},{{'1','6'}},{{'1','7'}},{{'1','8'}},{{'1','9'}},
    {{'2','0'}},{{'2','1'}},{{'2','2'}},{{'2','3'}},{{'2','4'}},{{'2','5'}},{{'2','6'}},{{'2','7'}},{{'2','8'}},{{'2','9'}},
    {{'3','0'}},{{'3','1'}},{{'3','2'}},{{'3','3'}},{{'3','4'}},{{'3','5'}},{{'3','6'}},{{'3','7'}},{{'3','8'}},{{'3','9'}},
    {{'4','0'}},{{'4','1'}},{{'4','2'}},{{'4','3'}},{{'4','4'}},{{'4','5'}},{{'4','6'}},{{'4','7'}},{{'4','8'}},{{'4','9'}},
    {{'5','0'}},{{'5','1'}},{{'5','2'}},{{'5','3'}},{{'5','4'}},{{'5','5'}},{{'5','6'}},{{'5','7'}},{{'5','8'}},{{'5','9'}},
    {{'6','0'}},{{'6','1'}},{{'6','2'}},{{'6','3'}},{{'6','4'}},{{'6','5'}},{{'6','6'}},{{'6','7'}},{{'6','8'}},{{'6','9'}},
    {{'7','0'}},{{'7','1'}},{{'7','2'}},{{'7','3'}},{{'7','4'}},{{'7','5'}},{{'7','6'}},{{'7','7'}},{{'7','8'}},{{'7','9'}},
    {{'8','0'}},{{'8','1'}},{{'8','2'}},{{'8','3'}},{{'8','4'}},{{'8','5'}},{{'8','6'}},{{'8','7'}},{{'8','8'}},{{'8','9'}},
    {{'9','0'}},{{'9','1'}},{{'9','2'}},{{'9','3'}},{{'9','4'}},{{'9','5'}},{{'9','6'}},{{'9','7'}},{{'9','8'}},{{'9','9'}},
    }
    };

    //specialcasefor"0"
    if(x==0)
    {
    o->write_character('0');
    return;
    }

    //useapointertofillthebuffer
    autobuffer_ptr=number_buffer.begin();//NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)

    constboolis_negative=std::is_same<NumberType,number_integer_t>::value&&!(x>=0);//seeissue#755
    number_unsigned_tabs_value;

    unsignedintn_chars{};

    if(is_negative)
    {
    *buffer_ptr='-';
    abs_value=remove_sign(static_cast<number_integer_t>(x));

    //accountonemorebytefortheminussign
    n_chars=1+count_digits(abs_value);
    }
    else
    {
    abs_value=static_cast<number_unsigned_t>(x);
    n_chars=count_digits(abs_value);
    }

    //spare1bytefor'\0'
    JSON_ASSERT(n_chars<number_buffer.size()-1);

    //jumptotheendtogeneratethestringfrombackward
    //sowelateravoidreversingtheresult
    buffer_ptr+=n_chars;

    //Fastint2asciiimplementationinspiredby"Fastware"talkbyAndreiAlexandrescu
    //See:https://www.youtube.com/watch?v=o4-CwDo2zpg
    while(abs_value>=100)
    {
    constautodigits_index=static_cast<unsigned>((abs_value%100));
    abs_value/=100;
    *(--buffer_ptr)=digits_to_99[digits_index][1];
    *(--buffer_ptr)=digits_to_99[digits_index][0];
    }

    if(abs_value>=10)
    {
    constautodigits_index=static_cast<unsigned>(abs_value);
    *(--buffer_ptr)=digits_to_99[digits_index][1];
    *(--buffer_ptr)=digits_to_99[digits_index][0];
    }
    else
    {
    *(--buffer_ptr)=static_cast<char>('0'+abs_value);
    }

    o->write_characters(number_buffer.data(),n_chars);
    }

    voiddump_float(number_float_tx)
    {
    //NaN/inf
    if(!std::isfinite(x))
    {
    o->write_characters("null",4);
    return;
    }

    //Ifnumber_float_tisanIEEE-754singleordoubleprecisionnumber,
    //usetheGrisu2algorithmtoproduceshortnumberswhichare
    //guaranteedtoround-trip,usingstrtofandstrtod,resp.
    //
    //NB:Thetestbelowworksif<longdouble>==<double>.
    staticconstexprboolis_ieee_single_or_double
    =(std::numeric_limits<number_float_t>::is_iec559&&std::numeric_limits<number_float_t>::digits==24&&std::numeric_limits<number_float_t>::max_exponent==128)||
    (std::numeric_limits<number_float_t>::is_iec559&&std::numeric_limits<number_float_t>::digits==53&&std::numeric_limits<number_float_t>::max_exponent==1024);

    dump_float(x,std::integral_constant<bool,is_ieee_single_or_double>());
    }

    voiddump_float(number_float_tx,std::true_type/*is_ieee_single_or_double*/)
    {
    auto*begin=number_buffer.data();
    auto*end=::nlohmann::detail::to_chars(begin,begin+number_buffer.size(),x);

    o->write_characters(begin,static_cast<size_t>(end-begin));
    }

    voiddump_float(number_float_tx,std::false_type/*is_ieee_single_or_double*/)
    {
    //getnumberofdigitsforafloat->text->floatround-trip
    staticconstexprautod=std::numeric_limits<number_float_t>::max_digits10;

    //theactualconversion
    //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
    std::ptrdiff_tlen=(std::snprintf)(number_buffer.data(),number_buffer.size(),"%.*g",d,x);

    //negativevalueindicatesanerror
    JSON_ASSERT(len>0);
    //checkifbufferwaslargeenough
    JSON_ASSERT(static_cast<std::size_t>(len)<number_buffer.size());

    //erasethousandsseparator
    if(thousands_sep!='\0')
    {
    auto*constend=std::remove(number_buffer.begin(),
    number_buffer.begin()+len,thousands_sep);
    std::fill(end,number_buffer.end(),'\0');
    JSON_ASSERT((end-number_buffer.begin())<=len);
    len=(end-number_buffer.begin());
    }

    //convertdecimalpointto'.'
    if(decimal_point!='\0'&&decimal_point!='.')
    {
    auto*constdec_pos=std::find(number_buffer.begin(),number_buffer.end(),decimal_point);
    if(dec_pos!=number_buffer.end())
    {
    *dec_pos='.';
    }
    }

    o->write_characters(number_buffer.data(),static_cast<std::size_t>(len));

    //determineifneedtoappend".0"
    constboolvalue_is_int_like=
    std::none_of(number_buffer.begin(),number_buffer.begin()+len+1,
    [](charc)
    {
    returnc=='.'||c=='e';
    });

    if(value_is_int_like)
    {
    o->write_characters(".0",2);
    }
    }

    staticstd::uint8_tdecode(std::uint8_t&state,std::uint32_t&codep,conststd::uint8_tbyte)noexcept
    {
    staticconststd::array<std::uint8_t,400>utf8d=
    {
    {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//00..1F
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//20..3F
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//40..5F
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//60..7F
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,//80..9F
    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,//A0..BF
    8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,//C0..DF
    0xA,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3,//E0..EF
    0xB,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,//F0..FF
    0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1,//s0..s0
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1,//s1..s2
    1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,//s3..s4
    1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1,//s5..s6
    1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1//s7..s8
    }
    };

    JSON_ASSERT(byte<utf8d.size());
    conststd::uint8_ttype=utf8d[byte];

    codep=(state!=UTF8_ACCEPT)
    ?(byte&0x3fu)|(codep<<6u)
    :(0xFFu>>type)&(byte);

    std::size_tindex=256u+static_cast<size_t>(state)*16u+static_cast<size_t>(type);
    JSON_ASSERT(index<400);
    state=utf8d[index];
    returnstate;
    }

    /*
    *Overloadtomakethecompilerhappywhileitisinstantiating
    *dump_integerfornumber_unsigned_t.
    *Mustneverbecalled.
    */
    number_unsigned_tremove_sign(number_unsigned_tx)
    {
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    returnx;//LCOV_EXCL_LINE
    }

    /*
    *Helperfunctionfordump_integer
    *
    *Thisfunctiontakesanegativesignedintegerandreturnsitsabsolute
    *valueasunsignedinteger.Theplus/minusshufflingisnecessaryaswecan
    *notdirectlyremovethesignofanarbitrarysignedintegerasthe
    *absolutevaluesofINT_MINandINT_MAXareusuallynotthesame.See
    *#1708fordetails.
    */
    inlinenumber_unsigned_tremove_sign(number_integer_tx)noexcept
    {
    JSON_ASSERT(x<0&&x<(std::numeric_limits<number_integer_t>::max)());//NOLINT(misc-redundant-expression)
    returnstatic_cast<number_unsigned_t>(-(x+1))+1;
    }

    private:
    output_adapter_t<char>o=nullptr;

    std::array<char,64>number_buffer{{}};

    conststd::lconv*loc=nullptr;
    constcharthousands_sep='\0';
    constchardecimal_point='\0';

    std::array<char,512>string_buffer{{}};

    constcharindent_char;
    string_tindent_string;

    consterror_handler_terror_handler;
    };
    }//namespacedetail
    }//namespacenlohmann

    //#include<nlohmann/detail/value_t.hpp>

    //#include<nlohmann/json_fwd.hpp>

    //#include<nlohmann/ordered_map.hpp>

    #include<functional>//less
    #include<initializer_list>//initializer_list
    #include<iterator>//input_iterator_tag,iterator_traits
    #include<memory>//allocator
    #include<stdexcept>//forout_of_range
    #include<type_traits>//enable_if,is_convertible
    #include<utility>//pair
    #include<vector>//vector

    //#include<nlohmann/detail/macro_scope.hpp>

    namespacenlohmann
    {

    template<classKey,classT,classIgnoredLess=std::less<Key>,
    classAllocator=std::allocator<std::pair<constKey,T>>>
    structordered_map:std::vector<std::pair<constKey,T>,Allocator>
    {
    usingkey_type=Key;
    usingmapped_type=T;
    usingContainer=std::vector<std::pair<constKey,T>,Allocator>;
    usingtypenameContainer::iterator;
    usingtypenameContainer::const_iterator;
    usingtypenameContainer::size_type;
    usingtypenameContainer::value_type;

    //Explicitconstructorsinsteadof`usingContainer::Container`
    //otherwiseoldercompilerschokeonit(GCC<=5.5,xcode<=9.4)
    ordered_map(constAllocator&alloc=Allocator()):Container{alloc}{}
    template<classIt>
    ordered_map(Itfirst,Itlast,constAllocator&alloc=Allocator())
    :Container{first,last,alloc}{}
    ordered_map(std::initializer_list<T>init,constAllocator&alloc=Allocator())
    :Container{init,alloc}{}

    std::pair<iterator,bool>emplace(constkey_type&key,T&&t)
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    return{it,false};
    }
    }
    Container::emplace_back(key,t);
    return{--this->end(),true};
    }

    T&operator[](constKey&key)
    {
    returnemplace(key,T{}).first->second;
    }

    constT&operator[](constKey&key)const
    {
    returnat(key);
    }

    T&at(constKey&key)
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    returnit->second;
    }
    }

    JSON_THROW(std::out_of_range("keynotfound"));
    }

    constT&at(constKey&key)const
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    returnit->second;
    }
    }

    JSON_THROW(std::out_of_range("keynotfound"));
    }

    size_typeerase(constKey&key)
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    //SincewecannotmoveconstKeys,re-constructtheminplace
    for(autonext=it;++next!=this->end();++it)
    {
    it->~value_type();//Destroybutkeepallocation
    new(&*it)value_type{std::move(*next)};
    }
    Container::pop_back();
    return1;
    }
    }
    return0;
    }

    iteratorerase(iteratorpos)
    {
    autoit=pos;

    //SincewecannotmoveconstKeys,re-constructtheminplace
    for(autonext=it;++next!=this->end();++it)
    {
    it->~value_type();//Destroybutkeepallocation
    new(&*it)value_type{std::move(*next)};
    }
    Container::pop_back();
    returnpos;
    }

    size_typecount(constKey&key)const
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    return1;
    }
    }
    return0;
    }

    iteratorfind(constKey&key)
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    returnit;
    }
    }
    returnContainer::end();
    }

    const_iteratorfind(constKey&key)const
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==key)
    {
    returnit;
    }
    }
    returnContainer::end();
    }

    std::pair<iterator,bool>insert(value_type&&value)
    {
    returnemplace(value.first,std::move(value.second));
    }

    std::pair<iterator,bool>insert(constvalue_type&value)
    {
    for(autoit=this->begin();it!=this->end();++it)
    {
    if(it->first==value.first)
    {
    return{it,false};
    }
    }
    Container::push_back(value);
    return{--this->end(),true};
    }

    template<typenameInputIt>
    usingrequire_input_iter=typenamestd::enable_if<std::is_convertible<typenamestd::iterator_traits<InputIt>::iterator_category,
    std::input_iterator_tag>::value>::type;

    template<typenameInputIt,typename=require_input_iter<InputIt>>
    voidinsert(InputItfirst,InputItlast)
    {
    for(autoit=first;it!=last;++it)
    {
    insert(*it);
    }
    }
    };

    }//namespacenlohmann

    #ifdefined(JSON_HAS_CPP_17)
    #include<string_view>
    #endif

    namespacenlohmann
    {

    NLOHMANN_BASIC_JSON_TPL_DECLARATION
    classbasic_json//NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
    {
    private:
    template<detail::value_t>friendstructdetail::external_constructor;
    friend::nlohmann::json_pointer<basic_json>;

    template<typenameBasicJsonType,typenameInputType>
    friendclass::nlohmann::detail::parser;
    friend::nlohmann::detail::serializer<basic_json>;
    template<typenameBasicJsonType>
    friendclass::nlohmann::detail::iter_impl;
    template<typenameBasicJsonType,typenameCharType>
    friendclass::nlohmann::detail::binary_writer;
    template<typenameBasicJsonType,typenameInputType,typenameSAX>
    friendclass::nlohmann::detail::binary_reader;
    template<typenameBasicJsonType>
    friendclass::nlohmann::detail::json_sax_dom_parser;
    template<typenameBasicJsonType>
    friendclass::nlohmann::detail::json_sax_dom_callback_parser;
    friendclass::nlohmann::detail::exception;

    usingbasic_json_t=NLOHMANN_BASIC_JSON_TPL;

    JSON_PRIVATE_UNLESS_TESTED:
    //conveniencealiasesfortypesresidinginnamespacedetail;
    usinglexer=::nlohmann::detail::lexer_base<basic_json>;

    template<typenameInputAdapterType>
    static::nlohmann::detail::parser<basic_json,InputAdapterType>parser(
    InputAdapterTypeadapter,
    detail::parser_callback_t<basic_json>cb=nullptr,
    constboolallow_exceptions=true,
    constboolignore_comments=false
    )
    {
    return::nlohmann::detail::parser<basic_json,InputAdapterType>(std::move(adapter),
    std::move(cb),allow_exceptions,ignore_comments);
    }

    private:
    usingprimitive_iterator_t=::nlohmann::detail::primitive_iterator_t;
    template<typenameBasicJsonType>
    usinginternal_iterator=::nlohmann::detail::internal_iterator<BasicJsonType>;
    template<typenameBasicJsonType>
    usingiter_impl=::nlohmann::detail::iter_impl<BasicJsonType>;
    template<typenameIterator>
    usingiteration_proxy=::nlohmann::detail::iteration_proxy<Iterator>;
    template<typenameBase>usingjson_reverse_iterator=::nlohmann::detail::json_reverse_iterator<Base>;

    template<typenameCharType>
    usingoutput_adapter_t=::nlohmann::detail::output_adapter_t<CharType>;

    template<typenameInputType>
    usingbinary_reader=::nlohmann::detail::binary_reader<basic_json, InputType>;
    template<typenameCharType>usingbinary_writer=::nlohmann::detail::binary_writer<basic_json, CharType>;

    JSON_PRIVATE_UNLESS_TESTED:
    usingserializer=::nlohmann::detail::serializer<basic_json>;

    public:
    usingvalue_t=detail::value_t;
    usingjson_pointer=::nlohmann::json_pointer<basic_json>;
    template<typenameT,typenameSFINAE>
    usingjson_serializer=JSONSerializer<T,SFINAE>;
    usingerror_handler_t=detail::error_handler_t;
    usingcbor_tag_handler_t=detail::cbor_tag_handler_t;
    usinginitializer_list_t=std::initializer_list<detail::json_ref<basic_json>>;

    usinginput_format_t=detail::input_format_t;
    usingjson_sax_t=json_sax<basic_json>;

    //exceptions//

    usingexception=detail::exception;
    usingparse_error=detail::parse_error;
    usinginvalid_iterator=detail::invalid_iterator;
    usingtype_error=detail::type_error;
    usingout_of_range=detail::out_of_range;
    usingother_error=detail::other_error;

    //containertypes//

    usingvalue_type=basic_json;

    usingreference=value_type&;
    usingconst_reference=constvalue_type&;

    usingdifference_type=std::ptrdiff_t;
    usingsize_type=std::size_t;

    usingallocator_type=AllocatorType<basic_json>;

    usingpointer=typenamestd::allocator_traits<allocator_type>::pointer;
    usingconst_pointer=typenamestd::allocator_traits<allocator_type>::const_pointer;

    usingiterator=iter_impl<basic_json>;
    usingconst_iterator=iter_impl<const basic_json>;
    usingreverse_iterator=json_reverse_iterator<typename basic_json::iterator>;
    usingconst_reverse_iterator=json_reverse_iterator<typename basic_json::const_iterator>;

    staticallocator_typeget_allocator()
    {
    returnallocator_type();
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonmeta()
    {
    basic_jsonresult;

    result["copyright"]="(C)2013-2021NielsLohmann";
    result["name"]="JSONforModernC++";
    result["url"]="https://github.com/nlohmann/json";
    result["version"]["string"]=
    std::to_string(NLOHMANN_JSON_VERSION_MAJOR)+"."+
    std::to_string(NLOHMANN_JSON_VERSION_MINOR)+"."+
    std::to_string(NLOHMANN_JSON_VERSION_PATCH);
    result["version"]["major"]=NLOHMANN_JSON_VERSION_MAJOR;
    result["version"]["minor"]=NLOHMANN_JSON_VERSION_MINOR;
    result["version"]["patch"]=NLOHMANN_JSON_VERSION_PATCH;

    #ifdef_WIN32
    result["platform"]="win32";
    #elifdefined__linux__
    result["platform"]="linux";
    #elifdefined__APPLE__
    result["platform"]="apple";
    #elifdefined__unix__
    result["platform"]="unix";
    #else
    result["platform"]="unknown";
    #endif

    #ifdefined(__ICC)||defined(__INTEL_COMPILER)
    result["compiler"]={{"family","icc"},{"version",__INTEL_COMPILER}};
    #elifdefined(__clang__)
    result["compiler"]={{"family","clang"},{"version",__clang_version__}};
    #elifdefined(__GNUC__)||defined(__GNUG__)
    result["compiler"]={{"family","gcc"},{"version",std::to_string(__GNUC__)+"."+std::to_string(__GNUC_MINOR__)+"."+std::to_string(__GNUC_PATCHLEVEL__)}};
    #elifdefined(__HP_cc)||defined(__HP_aCC)
    result["compiler"]="hp"
    #elifdefined(__IBMCPP__)
    result["compiler"]={{"family","ilecpp"},{"version",__IBMCPP__}};
    #elifdefined(_MSC_VER)
    result["compiler"]={{"family","msvc"},{"version",_MSC_VER}};
    #elifdefined(__PGI)
    result["compiler"]={{"family","pgcpp"},{"version",__PGI}};
    #elifdefined(__SUNPRO_CC)
    result["compiler"]={{"family","sunpro"},{"version",__SUNPRO_CC}};
    #else
    result["compiler"]={{"family","unknown"},{"version","unknown"}};
    #endif

    #ifdef__cplusplus
    result["compiler"]["c++"]=std::to_string(__cplusplus);
    #else
    result["compiler"]["c++"]="unknown";
    #endif
    returnresult;
    }

    //JSONvaluedatatypes//

    #ifdefined(JSON_HAS_CPP_14)
    //Usetransparentcomparatorifpossible,combinedwithperfectforwarding
    //onfind()andcount()callspreventsunnecessarystringconstruction.
    usingobject_comparator_t=std::less<>;
    #else
    usingobject_comparator_t=std::less<StringType>;
    #endif

    usingobject_t=ObjectType<StringType,
    basic_json,
    object_comparator_t,
    AllocatorType<std::pair<constStringType,
    basic_json>>>;

    usingarray_t=ArrayType<basic_json,AllocatorType<basic_json>>;

    usingstring_t=StringType;

    usingboolean_t=BooleanType;

    usingnumber_integer_t=NumberIntegerType;

    usingnumber_unsigned_t=NumberUnsignedType;

    usingnumber_float_t=NumberFloatType;

    usingbinary_t=nlohmann::byte_container_with_subtype<BinaryType>;

    private:

    template<typenameT,typename...Args>
    JSON_HEDLEY_RETURNS_NON_NULL
    staticT*create(Args&&...args)
    {
    AllocatorType<T>alloc;
    usingAllocatorTraits=std::allocator_traits<AllocatorType<T>>;

    autodeleter=[&](T*obj)
    {
    AllocatorTraits::deallocate(alloc,obj,1);
    };
    std::unique_ptr<T,decltype(deleter)>obj(AllocatorTraits::allocate(alloc,1),deleter);
    AllocatorTraits::construct(alloc,obj.get(),std::forward<Args>(args)...);
    JSON_ASSERT(obj!=nullptr);
    returnobj.release();
    }

    //JSONvaluestorage//

    JSON_PRIVATE_UNLESS_TESTED:
    unionjson_value
    {
    object_t*object;
    array_t*array;
    string_t*string;
    binary_t*binary;
    boolean_tboolean;
    number_integer_tnumber_integer;
    number_unsigned_tnumber_unsigned;
    number_float_tnumber_float;

    json_value()=default;
    json_value(boolean_tv)noexcept:boolean(v){}
    json_value(number_integer_tv)noexcept:number_integer(v){}
    json_value(number_unsigned_tv)noexcept:number_unsigned(v){}
    json_value(number_float_tv)noexcept:number_float(v){}
    json_value(value_tt)
    {
    switch(t)
    {
    casevalue_t::object:
    {
    object=create<object_t>();
    break;
    }

    casevalue_t::array:
    {
    array=create<array_t>();
    break;
    }

    casevalue_t::string:
    {
    string=create<string_t>("");
    break;
    }

    casevalue_t::binary:
    {
    binary=create<binary_t>();
    break;
    }

    casevalue_t::boolean:
    {
    boolean=boolean_t(false);
    break;
    }

    casevalue_t::number_integer:
    {
    number_integer=number_integer_t(0);
    break;
    }

    casevalue_t::number_unsigned:
    {
    number_unsigned=number_unsigned_t(0);
    break;
    }

    casevalue_t::number_float:
    {
    number_float=number_float_t(0.0);
    break;
    }

    casevalue_t::null:
    {
    object=nullptr;//silencewarning,see#821
    break;
    }

    default:
    {
    object=nullptr;//silencewarning,see#821
    if(JSON_HEDLEY_UNLIKELY(t==value_t::null))
    {
    JSON_THROW(other_error::create(500,"961c151d2e87f2686a955a9be24d316f1362bf213.9.1",basic_json()));//LCOV_EXCL_LINE
    }
    break;
    }
    }
    }

    json_value(conststring_t&value)
    {
    string=create<string_t>(value);
    }

    json_value(string_t&&value)
    {
    string=create<string_t>(std::move(value));
    }

    json_value(constobject_t&value)
    {
    object=create<object_t>(value);
    }

    json_value(object_t&&value)
    {
    object=create<object_t>(std::move(value));
    }

    json_value(constarray_t&value)
    {
    array=create<array_t>(value);
    }

    json_value(array_t&&value)
    {
    array=create<array_t>(std::move(value));
    }

    json_value(consttypenamebinary_t::container_type&value)
    {
    binary=create<binary_t>(value);
    }

    json_value(typenamebinary_t::container_type&&value)
    {
    binary=create<binary_t>(std::move(value));
    }

    json_value(constbinary_t&value)
    {
    binary=create<binary_t>(value);
    }

    json_value(binary_t&&value)
    {
    binary=create<binary_t>(std::move(value));
    }

    voiddestroy(value_tt)noexcept
    {
    //flattenthecurrentjson_valuetoaheap-allocatedstack
    std::vector<basic_json>stack;

    //movethetop-levelitemstostack
    if(t==value_t::array)
    {
    stack.reserve(array->size());
    std::move(array->begin(),array->end(),std::back_inserter(stack));
    }
    elseif(t==value_t::object)
    {
    stack.reserve(object->size());
    for(auto&&it:*object)
    {
    stack.push_back(std::move(it.second));
    }
    }

    while(!stack.empty())
    {
    //movethelastitemtolocalvariabletobeprocessed
    basic_jsoncurrent_item(std::move(stack.back()));
    stack.pop_back();

    //ifcurrent_itemisarray/object,move
    //itschildrentothestacktobeprocessedlater
    if(current_item.is_array())
    {
    std::move(current_item.m_value.array->begin(),current_item.m_value.array->end(),
    std::back_inserter(stack));

    current_item.m_value.array->clear();
    }
    elseif(current_item.is_object())
    {
    for(auto&&it:*current_item.m_value.object)
    {
    stack.push_back(std::move(it.second));
    }

    current_item.m_value.object->clear();
    }

    //it'snowsafethatcurrent_itemgetdestructed
    //sinceitdoesn'thaveanychildren
    }

    switch(t)
    {
    casevalue_t::object:
    {
    AllocatorType<object_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,object);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,object,1);
    break;
    }

    casevalue_t::array:
    {
    AllocatorType<array_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,array);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,array,1);
    break;
    }

    casevalue_t::string:
    {
    AllocatorType<string_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,string);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,string,1);
    break;
    }

    casevalue_t::binary:
    {
    AllocatorType<binary_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,binary);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,binary,1);
    break;
    }

    default:
    {
    break;
    }
    }
    }
    };

    private:
    voidassert_invariant(boolcheck_parents=true)constnoexcept
    {
    JSON_ASSERT(m_type!=value_t::object||m_value.object!=nullptr);
    JSON_ASSERT(m_type!=value_t::array||m_value.array!=nullptr);
    JSON_ASSERT(m_type!=value_t::string||m_value.string!=nullptr);
    JSON_ASSERT(m_type!=value_t::binary||m_value.binary!=nullptr);

    #ifJSON_DIAGNOSTICS
    JSON_TRY
    {
    //cppcheck-suppressassertWithSideEffect
    JSON_ASSERT(!check_parents||!is_structured()||std::all_of(begin(),end(),[this](constbasic_json&j)
    {
    returnj.m_parent==this;
    }));
    }
    JSON_CATCH(...){}//LCOV_EXCL_LINE
    #endif
    static_cast<void>(check_parents);
    }

    voidset_parents()
    {
    #ifJSON_DIAGNOSTICS
    switch(m_type)
    {
    casevalue_t::array:
    {
    for(auto&element:*m_value.array)
    {
    element.m_parent=this;
    }
    break;
    }

    casevalue_t::object:
    {
    for(auto&element:*m_value.object)
    {
    element.second.m_parent=this;
    }
    break;
    }

    default:
    break;
    }
    #endif
    }

    iteratorset_parents(iteratorit,typenameiterator::difference_typecount)
    {
    #ifJSON_DIAGNOSTICS
    for(typenameiterator::difference_typei=0;i<count;++i)
    {
    (it+i)->m_parent=this;
    }
    #else
    static_cast<void>(count);
    #endif
    returnit;
    }

    referenceset_parent(referencej)
    {
    #ifJSON_DIAGNOSTICS
    j.m_parent=this;
    #else
    static_cast<void>(j);
    #endif
    returnj;
    }

    public:
    //JSONparsercallback//

    usingparse_event_t=detail::parse_event_t;

    usingparser_callback_t=detail::parser_callback_t<basic_json>;

    //constructors//

    basic_json(constvalue_tv)
    :m_type(v),m_value(v)
    {
    assert_invariant();
    }

    basic_json(std::nullptr_t=nullptr)noexcept
    :basic_json(value_t::null)
    {
    assert_invariant();
    }

    template<typenameCompatibleType,
    typenameU=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))))
    {
    JSONSerializer<U>::to_json(*this,std::forward<CompatibleType>(val));
    set_parents();
    assert_invariant();
    }

    template<typenameBasicJsonType,
    detail::enable_if_t<
    detail::is_basic_json<BasicJsonType>::value&&!std::is_same<basic_json,BasicJsonType>::value,int>=0>
    basic_json(constBasicJsonType&val)
    {
    usingother_boolean_t=typenameBasicJsonType::boolean_t;
    usingother_number_float_t=typenameBasicJsonType::number_float_t;
    usingother_number_integer_t=typenameBasicJsonType::number_integer_t;
    usingother_number_unsigned_t=typenameBasicJsonType::number_unsigned_t;
    usingother_string_t=typenameBasicJsonType::string_t;
    usingother_object_t=typenameBasicJsonType::object_t;
    usingother_array_t=typenameBasicJsonType::array_t;
    usingother_binary_t=typenameBasicJsonType::binary_t;

    switch(val.type())
    {
    casevalue_t::boolean:
    JSONSerializer<other_boolean_t>::to_json(*this,val.templateget<other_boolean_t>());
    break;
    casevalue_t::number_float:
    JSONSerializer<other_number_float_t>::to_json(*this,val.templateget<other_number_float_t>());
    break;
    casevalue_t::number_integer:
    JSONSerializer<other_number_integer_t>::to_json(*this,val.templateget<other_number_integer_t>());
    break;
    casevalue_t::number_unsigned:
    JSONSerializer<other_number_unsigned_t>::to_json(*this,val.templateget<other_number_unsigned_t>());
    break;
    casevalue_t::string:
    JSONSerializer<other_string_t>::to_json(*this,val.templateget_ref<constother_string_t&>());
    break;
    casevalue_t::object:
    JSONSerializer<other_object_t>::to_json(*this,val.templateget_ref<constother_object_t&>());
    break;
    casevalue_t::array:
    JSONSerializer<other_array_t>::to_json(*this,val.templateget_ref<constother_array_t&>());
    break;
    casevalue_t::binary:
    JSONSerializer<other_binary_t>::to_json(*this,val.templateget_ref<constother_binary_t&>());
    break;
    casevalue_t::null:
    *this=nullptr;
    break;
    casevalue_t::discarded:
    m_type=value_t::discarded;
    break;
    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }
    set_parents();
    assert_invariant();
    }

    basic_json(initializer_list_tinit,
    booltype_deduction=true,
    value_tmanual_type=value_t::array)
    {
    //checkifeachelementisanarraywithtwoelementswhosefirst
    //elementisastring
    boolis_an_object=std::all_of(init.begin(),init.end(),
    [](constdetail::json_ref<basic_json>&element_ref)
    {
    returnelement_ref->is_array()&&element_ref->size()==2&&(*element_ref)[0].is_string();
    });

    //adjusttypeiftypedeductionisnotwanted
    if(!type_deduction)
    {
    //ifarrayiswanted,donotcreateanobjectthoughpossible
    if(manual_type==value_t::array)
    {
    is_an_object=false;
    }

    //ifobjectiswantedbutimpossible,throwanexception
    if(JSON_HEDLEY_UNLIKELY(manual_type==value_t::object&&!is_an_object))
    {
    JSON_THROW(type_error::create(301,"cannotcreateobjectfrominitializerlist",basic_json()));
    }
    }

    if(is_an_object)
    {
    //theinitializerlistisalistofpairs->createobject
    m_type=value_t::object;
    m_value=value_t::object;

    for(auto&element_ref:init)
    {
    autoelement=element_ref.moved_or_copied();
    m_value.object->emplace(
    std::move(*((*element.m_value.array)[0].m_value.string)),
    std::move((*element.m_value.array)[1]));
    }
    }
    else
    {
    //theinitializerlistdescribesanarray->createarray
    m_type=value_t::array;
    m_value.array=create<array_t>(init.begin(),init.end());
    }

    set_parents();
    assert_invariant();
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonbinary(consttypenamebinary_t::container_type&init)
    {
    autores=basic_json();
    res.m_type=value_t::binary;
    res.m_value=init;
    returnres;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonbinary(consttypenamebinary_t::container_type&init,std::uint8_tsubtype)
    {
    autores=basic_json();
    res.m_type=value_t::binary;
    res.m_value=binary_t(init,subtype);
    returnres;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonbinary(typenamebinary_t::container_type&&init)
    {
    autores=basic_json();
    res.m_type=value_t::binary;
    res.m_value=std::move(init);
    returnres;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonbinary(typenamebinary_t::container_type&&init,std::uint8_tsubtype)
    {
    autores=basic_json();
    res.m_type=value_t::binary;
    res.m_value=binary_t(std::move(init),subtype);
    returnres;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonarray(initializer_list_tinit={})
    {
    returnbasic_json(init,false,value_t::array);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonobject(initializer_list_tinit={})
    {
    returnbasic_json(init,false,value_t::object);
    }

    basic_json(size_typecnt,constbasic_json&val)
    :m_type(value_t::array)
    {
    m_value.array=create<array_t>(cnt,val);
    set_parents();
    assert_invariant();
    }

    template<classInputIT,typenamestd::enable_if<
    std::is_same<InputIT,typenamebasic_json_t::iterator>::value||
    std::is_same<InputIT,typenamebasic_json_t::const_iterator>::value,int>::type=0>
    basic_json(InputITfirst,InputITlast)
    {
    JSON_ASSERT(first.m_object!=nullptr);
    JSON_ASSERT(last.m_object!=nullptr);

    //makesureiteratorfitsthecurrentvalue
    if(JSON_HEDLEY_UNLIKELY(first.m_object!=last.m_object))
    {
    JSON_THROW(invalid_iterator::create(201,"iteratorsarenotcompatible",basic_json()));
    }

    //copytypefromfirstiterator
    m_type=first.m_object->m_type;

    //checkifiteratorrangeiscompleteforprimitivevalues
    switch(m_type)
    {
    casevalue_t::boolean:
    casevalue_t::number_float:
    casevalue_t::number_integer:
    casevalue_t::number_unsigned:
    casevalue_t::string:
    {
    if(JSON_HEDLEY_UNLIKELY(!first.m_it.primitive_iterator.is_begin()
    ||!last.m_it.primitive_iterator.is_end()))
    {
    JSON_THROW(invalid_iterator::create(204,"iteratorsoutofrange",*first.m_object));
    }
    break;
    }

    default:
    break;
    }

    switch(m_type)
    {
    casevalue_t::number_integer:
    {
    m_value.number_integer=first.m_object->m_value.number_integer;
    break;
    }

    casevalue_t::number_unsigned:
    {
    m_value.number_unsigned=first.m_object->m_value.number_unsigned;
    break;
    }

    casevalue_t::number_float:
    {
    m_value.number_float=first.m_object->m_value.number_float;
    break;
    }

    casevalue_t::boolean:
    {
    m_value.boolean=first.m_object->m_value.boolean;
    break;
    }

    casevalue_t::string:
    {
    m_value=*first.m_object->m_value.string;
    break;
    }

    casevalue_t::object:
    {
    m_value.object=create<object_t>(first.m_it.object_iterator,
    last.m_it.object_iterator);
    break;
    }

    casevalue_t::array:
    {
    m_value.array=create<array_t>(first.m_it.array_iterator,
    last.m_it.array_iterator);
    break;
    }

    casevalue_t::binary:
    {
    m_value=*first.m_object->m_value.binary;
    break;
    }

    default:
    JSON_THROW(invalid_iterator::create(206,"cannotconstructwithiteratorsfrom"+std::string(first.m_object->type_name()),*first.m_object));
    }

    set_parents();
    assert_invariant();
    }

    //otherconstructorsanddestructor//

    template<typenameJsonRef,
    detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,
    std::is_same<typenameJsonRef::value_type,basic_json>>::value,int>=0>
    basic_json(constJsonRef&ref):basic_json(ref.moved_or_copied()){}

    basic_json(constbasic_json&other)
    :m_type(other.m_type)
    {
    //checkofpassedvalueisvalid
    other.assert_invariant();

    switch(m_type)
    {
    casevalue_t::object:
    {
    m_value=*other.m_value.object;
    break;
    }

    casevalue_t::array:
    {
    m_value=*other.m_value.array;
    break;
    }

    casevalue_t::string:
    {
    m_value=*other.m_value.string;
    break;
    }

    casevalue_t::boolean:
    {
    m_value=other.m_value.boolean;
    break;
    }

    casevalue_t::number_integer:
    {
    m_value=other.m_value.number_integer;
    break;
    }

    casevalue_t::number_unsigned:
    {
    m_value=other.m_value.number_unsigned;
    break;
    }

    casevalue_t::number_float:
    {
    m_value=other.m_value.number_float;
    break;
    }

    casevalue_t::binary:
    {
    m_value=*other.m_value.binary;
    break;
    }

    default:
    break;
    }

    set_parents();
    assert_invariant();
    }

    basic_json(basic_json&&other)noexcept
    :m_type(std::move(other.m_type)),
    m_value(std::move(other.m_value))
    {
    //checkthatpassedvalueisvalid
    other.assert_invariant(false);

    //invalidatepayload
    other.m_type=value_t::null;
    other.m_value={};

    set_parents();
    assert_invariant();
    }

    basic_json&operator=(basic_jsonother)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
    )
    {
    //checkthatpassedvalueisvalid
    other.assert_invariant();

    usingstd::swap;
    swap(m_type,other.m_type);
    swap(m_value,other.m_value);

    set_parents();
    assert_invariant();
    return*this;
    }

    ~basic_json()noexcept
    {
    assert_invariant(false);
    m_value.destroy(m_type);
    }

    public:
    //objectinspection//

    string_tdump(constintindent=-1,
    constcharindent_char='',
    constboolensure_ascii=false,
    consterror_handler_terror_handler=error_handler_t::strict)const
    {
    string_tresult;
    serializers(detail::output_adapter<char, string_t>(result),indent_char,error_handler);

    if(indent>=0)
    {
    s.dump(*this,true,ensure_ascii,static_cast<unsignedint>(indent));
    }
    else
    {
    s.dump(*this,false,ensure_ascii,0);
    }

    returnresult;
    }

    constexprvalue_ttype()constnoexcept
    {
    returnm_type;
    }

    constexprboolis_primitive()constnoexcept
    {
    returnis_null()||is_string()||is_boolean()||is_number()||is_binary();
    }

    constexprboolis_structured()constnoexcept
    {
    returnis_array()||is_object();
    }

    constexprboolis_null()constnoexcept
    {
    returnm_type==value_t::null;
    }

    constexprboolis_boolean()constnoexcept
    {
    returnm_type==value_t::boolean;
    }

    constexprboolis_number()constnoexcept
    {
    returnis_number_integer()||is_number_float();
    }

    constexprboolis_number_integer()constnoexcept
    {
    returnm_type==value_t::number_integer||m_type==value_t::number_unsigned;
    }

    constexprboolis_number_unsigned()constnoexcept
    {
    returnm_type==value_t::number_unsigned;
    }

    constexprboolis_number_float()constnoexcept
    {
    returnm_type==value_t::number_float;
    }

    constexprboolis_object()constnoexcept
    {
    returnm_type==value_t::object;
    }

    constexprboolis_array()constnoexcept
    {
    returnm_type==value_t::array;
    }

    constexprboolis_string()constnoexcept
    {
    returnm_type==value_t::string;
    }

    constexprboolis_binary()constnoexcept
    {
    returnm_type==value_t::binary;
    }

    constexprboolis_discarded()constnoexcept
    {
    returnm_type==value_t::discarded;
    }

    constexproperatorvalue_t()constnoexcept
    {
    returnm_type;
    }

    private:
    //valueaccess//

    boolean_tget_impl(boolean_t*/*unused*/)const
    {
    if(JSON_HEDLEY_LIKELY(is_boolean()))
    {
    returnm_value.boolean;
    }

    JSON_THROW(type_error::create(302,"typemustbeboolean,butis"+std::string(type_name()),*this));
    }

    object_t*get_impl_ptr(object_t*/*unused*/)noexcept
    {
    returnis_object()?m_value.object:nullptr;
    }

    constexprconstobject_t*get_impl_ptr(constobject_t*/*unused*/)constnoexcept
    {
    returnis_object()?m_value.object:nullptr;
    }

    array_t*get_impl_ptr(array_t*/*unused*/)noexcept
    {
    returnis_array()?m_value.array:nullptr;
    }

    constexprconstarray_t*get_impl_ptr(constarray_t*/*unused*/)constnoexcept
    {
    returnis_array()?m_value.array:nullptr;
    }

    string_t*get_impl_ptr(string_t*/*unused*/)noexcept
    {
    returnis_string()?m_value.string:nullptr;
    }

    constexprconststring_t*get_impl_ptr(conststring_t*/*unused*/)constnoexcept
    {
    returnis_string()?m_value.string:nullptr;
    }

    boolean_t*get_impl_ptr(boolean_t*/*unused*/)noexcept
    {
    returnis_boolean()?&m_value.boolean:nullptr;
    }

    constexprconstboolean_t*get_impl_ptr(constboolean_t*/*unused*/)constnoexcept
    {
    returnis_boolean()?&m_value.boolean:nullptr;
    }

    number_integer_t*get_impl_ptr(number_integer_t*/*unused*/)noexcept
    {
    returnis_number_integer()?&m_value.number_integer:nullptr;
    }

    constexprconstnumber_integer_t*get_impl_ptr(constnumber_integer_t*/*unused*/)constnoexcept
    {
    returnis_number_integer()?&m_value.number_integer:nullptr;
    }

    number_unsigned_t*get_impl_ptr(number_unsigned_t*/*unused*/)noexcept
    {
    returnis_number_unsigned()?&m_value.number_unsigned:nullptr;
    }

    constexprconstnumber_unsigned_t*get_impl_ptr(constnumber_unsigned_t*/*unused*/)constnoexcept
    {
    returnis_number_unsigned()?&m_value.number_unsigned:nullptr;
    }

    number_float_t*get_impl_ptr(number_float_t*/*unused*/)noexcept
    {
    returnis_number_float()?&m_value.number_float:nullptr;
    }

    constexprconstnumber_float_t*get_impl_ptr(constnumber_float_t*/*unused*/)constnoexcept
    {
    returnis_number_float()?&m_value.number_float:nullptr;
    }

    binary_t*get_impl_ptr(binary_t*/*unused*/)noexcept
    {
    returnis_binary()?m_value.binary:nullptr;
    }

    constexprconstbinary_t*get_impl_ptr(constbinary_t*/*unused*/)constnoexcept
    {
    returnis_binary()?m_value.binary:nullptr;
    }

    template<typenameReferenceType,typenameThisType>
    staticReferenceTypeget_ref_impl(ThisType&obj)
    {
    //delegatethecalltoget_ptr<>()
    auto*ptr=obj.templateget_ptr<typenamestd::add_pointer<ReferenceType>::type>();

    if(JSON_HEDLEY_LIKELY(ptr!=nullptr))
    {
    return*ptr;
    }

    JSON_THROW(type_error::create(303,"incompatibleReferenceTypeforget_ref,actualtypeis"+std::string(obj.type_name()),obj));
    }

    public:

    template<typenamePointerType,typenamestd::enable_if<
    std::is_pointer<PointerType>::value,int>::type=0>
    autoget_ptr()noexcept->decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))
    {
    //delegatethecalltoget_impl_ptr<>()
    returnget_impl_ptr(static_cast<PointerType>(nullptr));
    }

    template<typenamePointerType,typenamestd::enable_if<
    std::is_pointer<PointerType>::value&&
    std::is_const<typenamestd::remove_pointer<PointerType>::type>::value,int>::type=0>
    constexprautoget_ptr()constnoexcept->decltype(std::declval<constbasic_json_t&>().get_impl_ptr(std::declval<PointerType>()))
    {
    //delegatethecalltoget_impl_ptr<>()const
    returnget_impl_ptr(static_cast<PointerType>(nullptr));
    }

    private:
    template<typenameValueType,
    detail::enable_if_t<
    detail::is_default_constructible<ValueType>::value&&
    detail::has_from_json<basic_json_t, ValueType>::value,
    int>=0>
    ValueTypeget_impl(detail::priority_tag<0>/*unused*/)constnoexcept(noexcept(
    JSONSerializer<ValueType>::from_json(std::declval<constbasic_json_t&>(),std::declval<ValueType&>())))
    {
    ValueTyperet{};
    JSONSerializer<ValueType>::from_json(*this,ret);
    returnret;
    }

    template<typenameValueType,
    detail::enable_if_t<
    detail::has_non_default_from_json<basic_json_t, ValueType>::value,
    int>=0>
    ValueTypeget_impl(detail::priority_tag<1>/*unused*/)constnoexcept(noexcept(
    JSONSerializer<ValueType>::from_json(std::declval<constbasic_json_t&>())))
    {
    returnJSONSerializer<ValueType>::from_json(*this);
    }

    template<typenameBasicJsonType,
    detail::enable_if_t<
    detail::is_basic_json<BasicJsonType>::value,
    int>=0>
    BasicJsonTypeget_impl(detail::priority_tag<2>/*unused*/)const
    {
    return*this;
    }

    template<typenameBasicJsonType,
    detail::enable_if_t<
    std::is_same<BasicJsonType,basic_json_t>::value,
    int>=0>
    basic_jsonget_impl(detail::priority_tag<3>/*unused*/)const
    {
    return*this;
    }

    template<typenamePointerType,
    detail::enable_if_t<
    std::is_pointer<PointerType>::value,
    int>=0>
    constexprautoget_impl(detail::priority_tag<4>/*unused*/)constnoexcept
    ->decltype(std::declval<constbasic_json_t&>().templateget_ptr<PointerType>())
    {
    //delegatethecalltoget_ptr
    returnget_ptr<PointerType>();
    }

    public:
    template<typenameValueTypeCV,typenameValueType=detail::uncvref_t<ValueTypeCV>>
    #ifdefined(JSON_HAS_CPP_14)
    constexpr
    #endif
    autoget()constnoexcept(
    noexcept(std::declval<constbasic_json_t&>().templateget_impl<ValueType>(detail::priority_tag<4>{})))
    ->decltype(std::declval<constbasic_json_t&>().templateget_impl<ValueType>(detail::priority_tag<4>{}))
    {
    //wecannotstatic_assertonValueTypeCVbeingnon-const,because
    //thereissupportforget<constbasic_json_t>(),whichiswhywe
    //stillneedtheuncvref
    static_assert(!std::is_reference<ValueTypeCV>::value,
    "get()cannotbeusedwithreferencetypes,youmightwanttouseget_ref()");
    returnget_impl<ValueType>(detail::priority_tag<4>{});
    }

    template<typenamePointerType,typenamestd::enable_if<
    std::is_pointer<PointerType>::value,int>::type=0>
    autoget()noexcept->decltype(std::declval<basic_json_t&>().templateget_ptr<PointerType>())
    {
    //delegatethecalltoget_ptr
    returnget_ptr<PointerType>();
    }

    template<typenameValueType,
    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)constnoexcept(noexcept(
    JSONSerializer<ValueType>::from_json(std::declval<constbasic_json_t&>(),v)))
    {
    JSONSerializer<ValueType>::from_json(*this,v);
    returnv;
    }

    //specializationtoallowtocallget_towithabasic_jsonvalue
    //seehttps://github.com/nlohmann/json/issues/2175
    template<typenameValueType,
    detail::enable_if_t<
    detail::is_basic_json<ValueType>::value,
    int>=0>
    ValueType&get_to(ValueType&v)const
    {
    v=*this;
    returnv;
    }

    template<
    typenameT,std::size_tN,
    typenameArray=T(&)[N],//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    detail::enable_if_t<
    detail::has_from_json<basic_json_t, Array>::value,int>=0>
    Arrayget_to(T(&v)[N])const//NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
    noexcept(noexcept(JSONSerializer<Array>::from_json(
    std::declval<constbasic_json_t&>(),v)))
    {
    JSONSerializer<Array>::from_json(*this,v);
    returnv;
    }

    template<typenameReferenceType,typenamestd::enable_if<
    std::is_reference<ReferenceType>::value,int>::type=0>
    ReferenceTypeget_ref()
    {
    //delegatecalltoget_ref_impl
    returnget_ref_impl<ReferenceType>(*this);
    }

    template<typenameReferenceType,typenamestd::enable_if<
    std::is_reference<ReferenceType>::value&&
    std::is_const<typenamestd::remove_reference<ReferenceType>::type>::value,int>::type=0>
    ReferenceTypeget_ref()const
    {
    //delegatecalltoget_ref_impl
    returnget_ref_impl<ReferenceType>(*this);
    }

    template<typenameValueType,typenamestd::enable_if<
    !std::is_pointer<ValueType>::value&&
    !std::is_same<ValueType,detail::json_ref<basic_json>>::value&&
    !std::is_same<ValueType,typenamestring_t::value_type>::value&&
    !detail::is_basic_json<ValueType>::value
    &&!std::is_same<ValueType,std::initializer_list<typenamestring_t::value_type>>::value
    #ifdefined(JSON_HAS_CPP_17)&&(defined(__GNUC__)||(defined(_MSC_VER)&&_MSC_VER>=1910&&_MSC_VER<=1914))
    &&!std::is_same<ValueType,typenamestd::string_view>::value
    #endif
    &&detail::is_detected<detail::get_template_function, const basic_json_t&, ValueType>::value
    ,int>::type=0>
    JSON_EXPLICIToperatorValueType()const
    {
    //delegatethecalltoget<>()const
    returnget<ValueType>();
    }

    binary_t&get_binary()
    {
    if(!is_binary())
    {
    JSON_THROW(type_error::create(302,"typemustbebinary,butis"+std::string(type_name()),*this));
    }

    return*get_ptr<binary_t*>();
    }

    constbinary_t&get_binary()const
    {
    if(!is_binary())
    {
    JSON_THROW(type_error::create(302,"typemustbebinary,butis"+std::string(type_name()),*this));
    }

    return*get_ptr<constbinary_t*>();
    }

    //elementaccess//

    referenceat(size_typeidx)
    {
    //atonlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    JSON_TRY
    {
    returnset_parent(m_value.array->at(idx));
    }
    JSON_CATCH(std::out_of_range&)
    {
    //createbetterexceptionexplanation
    JSON_THROW(out_of_range::create(401,"arrayindex"+std::to_string(idx)+"isoutofrange",*this));
    }
    }
    else
    {
    JSON_THROW(type_error::create(304,"cannotuseat()with"+std::string(type_name()),*this));
    }
    }

    const_referenceat(size_typeidx)const
    {
    //atonlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    JSON_TRY
    {
    returnm_value.array->at(idx);
    }
    JSON_CATCH(std::out_of_range&)
    {
    //createbetterexceptionexplanation
    JSON_THROW(out_of_range::create(401,"arrayindex"+std::to_string(idx)+"isoutofrange",*this));
    }
    }
    else
    {
    JSON_THROW(type_error::create(304,"cannotuseat()with"+std::string(type_name()),*this));
    }
    }

    referenceat(consttypenameobject_t::key_type&key)
    {
    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    JSON_TRY
    {
    returnset_parent(m_value.object->at(key));
    }
    JSON_CATCH(std::out_of_range&)
    {
    //createbetterexceptionexplanation
    JSON_THROW(out_of_range::create(403,"key'"+key+"'notfound",*this));
    }
    }
    else
    {
    JSON_THROW(type_error::create(304,"cannotuseat()with"+std::string(type_name()),*this));
    }
    }

    const_referenceat(consttypenameobject_t::key_type&key)const
    {
    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    JSON_TRY
    {
    returnm_value.object->at(key);
    }
    JSON_CATCH(std::out_of_range&)
    {
    //createbetterexceptionexplanation
    JSON_THROW(out_of_range::create(403,"key'"+key+"'notfound",*this));
    }
    }
    else
    {
    JSON_THROW(type_error::create(304,"cannotuseat()with"+std::string(type_name()),*this));
    }
    }

    referenceoperator[](size_typeidx)
    {
    //implicitlyconvertnullvaluetoanemptyarray
    if(is_null())
    {
    m_type=value_t::array;
    m_value.array=create<array_t>();
    assert_invariant();
    }

    //operator[]onlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    //filluparraywithnullvaluesifgivenidxisoutsiderange
    if(idx>=m_value.array->size())
    {
    #ifJSON_DIAGNOSTICS
    //rememberarraysizebeforeresizing
    constautoprevious_size=m_value.array->size();
    #endif
    m_value.array->resize(idx+1);

    #ifJSON_DIAGNOSTICS
    //setparentforvaluesaddedabove
    set_parents(begin()+static_cast<typenameiterator::difference_type>(previous_size),static_cast<typenameiterator::difference_type>(idx+1-previous_size));
    #endif
    }

    returnm_value.array->operator[](idx);
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withanumericargumentwith"+std::string(type_name()),*this));
    }

    const_referenceoperator[](size_typeidx)const
    {
    //constoperator[]onlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    returnm_value.array->operator[](idx);
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withanumericargumentwith"+std::string(type_name()),*this));
    }

    referenceoperator[](consttypenameobject_t::key_type&key)
    {
    //implicitlyconvertnullvaluetoanemptyobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value.object=create<object_t>();
    assert_invariant();
    }

    //operator[]onlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    returnset_parent(m_value.object->operator[](key));
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withastringargumentwith"+std::string(type_name()),*this));
    }

    const_referenceoperator[](consttypenameobject_t::key_type&key)const
    {
    //constoperator[]onlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    JSON_ASSERT(m_value.object->find(key)!=m_value.object->end());
    returnm_value.object->find(key)->second;
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withastringargumentwith"+std::string(type_name()),*this));
    }

    template<typenameT>
    JSON_HEDLEY_NON_NULL(2)
    referenceoperator[](T*key)
    {
    //implicitlyconvertnulltoobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value=value_t::object;
    assert_invariant();
    }

    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    returnset_parent(m_value.object->operator[](key));
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withastringargumentwith"+std::string(type_name()),*this));
    }

    template<typenameT>
    JSON_HEDLEY_NON_NULL(2)
    const_referenceoperator[](T*key)const
    {
    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    JSON_ASSERT(m_value.object->find(key)!=m_value.object->end());
    returnm_value.object->find(key)->second;
    }

    JSON_THROW(type_error::create(305,"cannotuseoperator[]withastringargumentwith"+std::string(type_name()),*this));
    }

    //usingstd::is_convertibleinastd::enable_ifwillfailwhenusingexplicitconversions
    template<classValueType,typenamestd::enable_if<
    detail::is_getable<basic_json_t, ValueType>::value
    &&!std::is_same<value_t,ValueType>::value,int>::type=0>
    ValueTypevalue(consttypenameobject_t::key_type&key,constValueType&default_value)const
    {
    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    //ifkeyisfound,returnvalueandgivendefaultvalueotherwise
    constautoit=find(key);
    if(it!=end())
    {
    returnit->templateget<ValueType>();
    }

    returndefault_value;
    }

    JSON_THROW(type_error::create(306,"cannotusevalue()with"+std::string(type_name()),*this));
    }

    string_tvalue(consttypenameobject_t::key_type&key,constchar*default_value)const
    {
    returnvalue(key,string_t(default_value));
    }

    template<classValueType,typenamestd::enable_if<
    detail::is_getable<basic_json_t, ValueType>::value,int>::type=0>
    ValueTypevalue(constjson_pointer&ptr,constValueType&default_value)const
    {
    //atonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    //ifpointerresolvesavalue,returnitorusedefaultvalue
    JSON_TRY
    {
    returnptr.get_checked(this).templateget<ValueType>();
    }
    JSON_INTERNAL_CATCH(out_of_range&)
    {
    returndefault_value;
    }
    }

    JSON_THROW(type_error::create(306,"cannotusevalue()with"+std::string(type_name()),*this));
    }

    JSON_HEDLEY_NON_NULL(3)
    string_tvalue(constjson_pointer&ptr,constchar*default_value)const
    {
    returnvalue(ptr,string_t(default_value));
    }

    referencefront()
    {
    return*begin();
    }

    const_referencefront()const
    {
    return*cbegin();
    }

    referenceback()
    {
    autotmp=end();
    --tmp;
    return*tmp;
    }

    const_referenceback()const
    {
    autotmp=cend();
    --tmp;
    return*tmp;
    }

    template<classIteratorType,typenamestd::enable_if<
    std::is_same<IteratorType,typenamebasic_json_t::iterator>::value||
    std::is_same<IteratorType,typenamebasic_json_t::const_iterator>::value,int>::type
    =0>
    IteratorTypeerase(IteratorTypepos)
    {
    //makesureiteratorfitsthecurrentvalue
    if(JSON_HEDLEY_UNLIKELY(this!=pos.m_object))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratordoesnotfitcurrentvalue",*this));
    }

    IteratorTyperesult=end();

    switch(m_type)
    {
    casevalue_t::boolean:
    casevalue_t::number_float:
    casevalue_t::number_integer:
    casevalue_t::number_unsigned:
    casevalue_t::string:
    casevalue_t::binary:
    {
    if(JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
    {
    JSON_THROW(invalid_iterator::create(205,"iteratoroutofrange",*this));
    }

    if(is_string())
    {
    AllocatorType<string_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,m_value.string);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,m_value.string,1);
    m_value.string=nullptr;
    }
    elseif(is_binary())
    {
    AllocatorType<binary_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,m_value.binary);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,m_value.binary,1);
    m_value.binary=nullptr;
    }

    m_type=value_t::null;
    assert_invariant();
    break;
    }

    casevalue_t::object:
    {
    result.m_it.object_iterator=m_value.object->erase(pos.m_it.object_iterator);
    break;
    }

    casevalue_t::array:
    {
    result.m_it.array_iterator=m_value.array->erase(pos.m_it.array_iterator);
    break;
    }

    default:
    JSON_THROW(type_error::create(307,"cannotuseerase()with"+std::string(type_name()),*this));
    }

    returnresult;
    }

    template<classIteratorType,typenamestd::enable_if<
    std::is_same<IteratorType,typenamebasic_json_t::iterator>::value||
    std::is_same<IteratorType,typenamebasic_json_t::const_iterator>::value,int>::type
    =0>
    IteratorTypeerase(IteratorTypefirst,IteratorTypelast)
    {
    //makesureiteratorfitsthecurrentvalue
    if(JSON_HEDLEY_UNLIKELY(this!=first.m_object||this!=last.m_object))
    {
    JSON_THROW(invalid_iterator::create(203,"iteratorsdonotfitcurrentvalue",*this));
    }

    IteratorTyperesult=end();

    switch(m_type)
    {
    casevalue_t::boolean:
    casevalue_t::number_float:
    casevalue_t::number_integer:
    casevalue_t::number_unsigned:
    casevalue_t::string:
    casevalue_t::binary:
    {
    if(JSON_HEDLEY_LIKELY(!first.m_it.primitive_iterator.is_begin()
    ||!last.m_it.primitive_iterator.is_end()))
    {
    JSON_THROW(invalid_iterator::create(204,"iteratorsoutofrange",*this));
    }

    if(is_string())
    {
    AllocatorType<string_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,m_value.string);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,m_value.string,1);
    m_value.string=nullptr;
    }
    elseif(is_binary())
    {
    AllocatorType<binary_t>alloc;
    std::allocator_traits<decltype(alloc)>::destroy(alloc,m_value.binary);
    std::allocator_traits<decltype(alloc)>::deallocate(alloc,m_value.binary,1);
    m_value.binary=nullptr;
    }

    m_type=value_t::null;
    assert_invariant();
    break;
    }

    casevalue_t::object:
    {
    result.m_it.object_iterator=m_value.object->erase(first.m_it.object_iterator,
    last.m_it.object_iterator);
    break;
    }

    casevalue_t::array:
    {
    result.m_it.array_iterator=m_value.array->erase(first.m_it.array_iterator,
    last.m_it.array_iterator);
    break;
    }

    default:
    JSON_THROW(type_error::create(307,"cannotuseerase()with"+std::string(type_name()),*this));
    }

    returnresult;
    }

    size_typeerase(consttypenameobject_t::key_type&key)
    {
    //thiseraseonlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    returnm_value.object->erase(key);
    }

    JSON_THROW(type_error::create(307,"cannotuseerase()with"+std::string(type_name()),*this));
    }

    voiderase(constsize_typeidx)
    {
    //thiseraseonlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    if(JSON_HEDLEY_UNLIKELY(idx>=size()))
    {
    JSON_THROW(out_of_range::create(401,"arrayindex"+std::to_string(idx)+"isoutofrange",*this));
    }

    m_value.array->erase(m_value.array->begin()+static_cast<difference_type>(idx));
    }
    else
    {
    JSON_THROW(type_error::create(307,"cannotuseerase()with"+std::string(type_name()),*this));
    }
    }

    //lookup//

    template<typenameKeyT>
    iteratorfind(KeyT&&key)
    {
    autoresult=end();

    if(is_object())
    {
    result.m_it.object_iterator=m_value.object->find(std::forward<KeyT>(key));
    }

    returnresult;
    }

    template<typenameKeyT>
    const_iteratorfind(KeyT&&key)const
    {
    autoresult=cend();

    if(is_object())
    {
    result.m_it.object_iterator=m_value.object->find(std::forward<KeyT>(key));
    }

    returnresult;
    }

    template<typenameKeyT>
    size_typecount(KeyT&&key)const
    {
    //return0forallnonobjecttypes
    returnis_object()?m_value.object->count(std::forward<KeyT>(key)):0;
    }

    template<typenameKeyT,typenamestd::enable_if<
    !std::is_same<typenamestd::decay<KeyT>::type,json_pointer>::value,int>::type=0>
    boolcontains(KeyT&&key)const
    {
    returnis_object()&&m_value.object->find(std::forward<KeyT>(key))!=m_value.object->end();
    }

    boolcontains(constjson_pointer&ptr)const
    {
    returnptr.contains(this);
    }

    //iterators//

    iteratorbegin()noexcept
    {
    iteratorresult(this);
    result.set_begin();
    returnresult;
    }

    const_iteratorbegin()constnoexcept
    {
    returncbegin();
    }

    const_iteratorcbegin()constnoexcept
    {
    const_iteratorresult(this);
    result.set_begin();
    returnresult;
    }

    iteratorend()noexcept
    {
    iteratorresult(this);
    result.set_end();
    returnresult;
    }

    const_iteratorend()constnoexcept
    {
    returncend();
    }

    const_iteratorcend()constnoexcept
    {
    const_iteratorresult(this);
    result.set_end();
    returnresult;
    }

    reverse_iteratorrbegin()noexcept
    {
    returnreverse_iterator(end());
    }

    const_reverse_iteratorrbegin()constnoexcept
    {
    returncrbegin();
    }

    reverse_iteratorrend()noexcept
    {
    returnreverse_iterator(begin());
    }

    const_reverse_iteratorrend()constnoexcept
    {
    returncrend();
    }

    const_reverse_iteratorcrbegin()constnoexcept
    {
    returnconst_reverse_iterator(cend());
    }

    const_reverse_iteratorcrend()constnoexcept
    {
    returnconst_reverse_iterator(cbegin());
    }

    public:
    JSON_HEDLEY_DEPRECATED_FOR(3.1.0,items())
    staticiteration_proxy<iterator>iterator_wrapper(referenceref)noexcept
    {
    returnref.items();
    }

    JSON_HEDLEY_DEPRECATED_FOR(3.1.0,items())
    staticiteration_proxy<const_iterator>iterator_wrapper(const_referenceref)noexcept
    {
    returnref.items();
    }

    iteration_proxy<iterator>items()noexcept
    {
    returniteration_proxy<iterator>(*this);
    }

    iteration_proxy<const_iterator>items()constnoexcept
    {
    returniteration_proxy<const_iterator>(*this);
    }

    //capacity//

    boolempty()constnoexcept
    {
    switch(m_type)
    {
    casevalue_t::null:
    {
    //nullvaluesareempty
    returntrue;
    }

    casevalue_t::array:
    {
    //delegatecalltoarray_t::empty()
    returnm_value.array->empty();
    }

    casevalue_t::object:
    {
    //delegatecalltoobject_t::empty()
    returnm_value.object->empty();
    }

    default:
    {
    //allothertypesarenonempty
    returnfalse;
    }
    }
    }

    size_typesize()constnoexcept
    {
    switch(m_type)
    {
    casevalue_t::null:
    {
    //nullvaluesareempty
    return0;
    }

    casevalue_t::array:
    {
    //delegatecalltoarray_t::size()
    returnm_value.array->size();
    }

    casevalue_t::object:
    {
    //delegatecalltoobject_t::size()
    returnm_value.object->size();
    }

    default:
    {
    //allothertypeshavesize1
    return1;
    }
    }
    }

    size_typemax_size()constnoexcept
    {
    switch(m_type)
    {
    casevalue_t::array:
    {
    //delegatecalltoarray_t::max_size()
    returnm_value.array->max_size();
    }

    casevalue_t::object:
    {
    //delegatecalltoobject_t::max_size()
    returnm_value.object->max_size();
    }

    default:
    {
    //allothertypeshavemax_size()==size()
    returnsize();
    }
    }
    }

    //modifiers//

    voidclear()noexcept
    {
    switch(m_type)
    {
    casevalue_t::number_integer:
    {
    m_value.number_integer=0;
    break;
    }

    casevalue_t::number_unsigned:
    {
    m_value.number_unsigned=0;
    break;
    }

    casevalue_t::number_float:
    {
    m_value.number_float=0.0;
    break;
    }

    casevalue_t::boolean:
    {
    m_value.boolean=false;
    break;
    }

    casevalue_t::string:
    {
    m_value.string->clear();
    break;
    }

    casevalue_t::binary:
    {
    m_value.binary->clear();
    break;
    }

    casevalue_t::array:
    {
    m_value.array->clear();
    break;
    }

    casevalue_t::object:
    {
    m_value.object->clear();
    break;
    }

    default:
    break;
    }
    }

    voidpush_back(basic_json&&val)
    {
    //push_backonlyworksfornullobjectsorarrays
    if(JSON_HEDLEY_UNLIKELY(!(is_null()||is_array())))
    {
    JSON_THROW(type_error::create(308,"cannotusepush_back()with"+std::string(type_name()),*this));
    }

    //transformnullobjectintoanarray
    if(is_null())
    {
    m_type=value_t::array;
    m_value=value_t::array;
    assert_invariant();
    }

    //addelementtoarray(movesemantics)
    m_value.array->push_back(std::move(val));
    set_parent(m_value.array->back());
    //ifvalismovedfrom,basic_jsonmoveconstructormarksitnullsowedonotcallthedestructor
    }

    referenceoperator+=(basic_json&&val)
    {
    push_back(std::move(val));
    return*this;
    }

    voidpush_back(constbasic_json&val)
    {
    //push_backonlyworksfornullobjectsorarrays
    if(JSON_HEDLEY_UNLIKELY(!(is_null()||is_array())))
    {
    JSON_THROW(type_error::create(308,"cannotusepush_back()with"+std::string(type_name()),*this));
    }

    //transformnullobjectintoanarray
    if(is_null())
    {
    m_type=value_t::array;
    m_value=value_t::array;
    assert_invariant();
    }

    //addelementtoarray
    m_value.array->push_back(val);
    set_parent(m_value.array->back());
    }

    referenceoperator+=(constbasic_json&val)
    {
    push_back(val);
    return*this;
    }

    voidpush_back(consttypenameobject_t::value_type&val)
    {
    //push_backonlyworksfornullobjectsorobjects
    if(JSON_HEDLEY_UNLIKELY(!(is_null()||is_object())))
    {
    JSON_THROW(type_error::create(308,"cannotusepush_back()with"+std::string(type_name()),*this));
    }

    //transformnullobjectintoanobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value=value_t::object;
    assert_invariant();
    }

    //addelementtoobject
    autores=m_value.object->insert(val);
    set_parent(res.first->second);
    }

    referenceoperator+=(consttypenameobject_t::value_type&val)
    {
    push_back(val);
    return*this;
    }

    voidpush_back(initializer_list_tinit)
    {
    if(is_object()&&init.size()==2&&(*init.begin())->is_string())
    {
    basic_json&&key=init.begin()->moved_or_copied();
    push_back(typenameobject_t::value_type(
    std::move(key.get_ref<string_t&>()),(init.begin()+1)->moved_or_copied()));
    }
    else
    {
    push_back(basic_json(init));
    }
    }

    referenceoperator+=(initializer_list_tinit)
    {
    push_back(init);
    return*this;
    }

    template<class...Args>
    referenceemplace_back(Args&&...args)
    {
    //emplace_backonlyworksfornullobjectsorarrays
    if(JSON_HEDLEY_UNLIKELY(!(is_null()||is_array())))
    {
    JSON_THROW(type_error::create(311,"cannotuseemplace_back()with"+std::string(type_name()),*this));
    }

    //transformnullobjectintoanarray
    if(is_null())
    {
    m_type=value_t::array;
    m_value=value_t::array;
    assert_invariant();
    }

    //addelementtoarray(perfectforwarding)
    #ifdefJSON_HAS_CPP_17
    returnset_parent(m_value.array->emplace_back(std::forward<Args>(args)...));
    #else
    m_value.array->emplace_back(std::forward<Args>(args)...);
    returnset_parent(m_value.array->back());
    #endif
    }

    template<class...Args>
    std::pair<iterator,bool>emplace(Args&&...args)
    {
    //emplaceonlyworksfornullobjectsorarrays
    if(JSON_HEDLEY_UNLIKELY(!(is_null()||is_object())))
    {
    JSON_THROW(type_error::create(311,"cannotuseemplace()with"+std::string(type_name()),*this));
    }

    //transformnullobjectintoanobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value=value_t::object;
    assert_invariant();
    }

    //addelementtoarray(perfectforwarding)
    autores=m_value.object->emplace(std::forward<Args>(args)...);
    set_parent(res.first->second);

    //createresultiteratorandsetiteratortotheresultofemplace
    autoit=begin();
    it.m_it.object_iterator=res.first;

    //returnpairofiteratorandboolean
    return{it,res.second};
    }

    template<typename...Args>
    iteratorinsert_iterator(const_iteratorpos,Args&&...args)
    {
    iteratorresult(this);
    JSON_ASSERT(m_value.array!=nullptr);

    autoinsert_pos=std::distance(m_value.array->begin(),pos.m_it.array_iterator);
    m_value.array->insert(pos.m_it.array_iterator,std::forward<Args>(args)...);
    result.m_it.array_iterator=m_value.array->begin()+insert_pos;

    //Thiscouldhavebeenwrittenas:
    //result.m_it.array_iterator=m_value.array->insert(pos.m_it.array_iterator,cnt,val);
    //butthereturnvalueofinsertismissinginGCC4.8,soitiswrittenthiswayinstead.

    returnresult;
    }

    iteratorinsert(const_iteratorpos,constbasic_json&val)
    {
    //insertonlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    //checkifiteratorposfitstothisJSONvalue
    if(JSON_HEDLEY_UNLIKELY(pos.m_object!=this))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratordoesnotfitcurrentvalue",*this));
    }

    //inserttoarrayandreturniterator
    returnset_parents(insert_iterator(pos,val),static_cast<typenameiterator::difference_type>(1));
    }

    JSON_THROW(type_error::create(309,"cannotuseinsert()with"+std::string(type_name()),*this));
    }

    iteratorinsert(const_iteratorpos,basic_json&&val)
    {
    returninsert(pos,val);
    }

    iteratorinsert(const_iteratorpos,size_typecnt,constbasic_json&val)
    {
    //insertonlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    //checkifiteratorposfitstothisJSONvalue
    if(JSON_HEDLEY_UNLIKELY(pos.m_object!=this))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratordoesnotfitcurrentvalue",*this));
    }

    //inserttoarrayandreturniterator
    returnset_parents(insert_iterator(pos,cnt,val),static_cast<typenameiterator::difference_type>(cnt));
    }

    JSON_THROW(type_error::create(309,"cannotuseinsert()with"+std::string(type_name()),*this));
    }

    iteratorinsert(const_iteratorpos,const_iteratorfirst,const_iteratorlast)
    {
    //insertonlyworksforarrays
    if(JSON_HEDLEY_UNLIKELY(!is_array()))
    {
    JSON_THROW(type_error::create(309,"cannotuseinsert()with"+std::string(type_name()),*this));
    }

    //checkifiteratorposfitstothisJSONvalue
    if(JSON_HEDLEY_UNLIKELY(pos.m_object!=this))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratordoesnotfitcurrentvalue",*this));
    }

    //checkifrangeiteratorsbelongtothesameJSONobject
    if(JSON_HEDLEY_UNLIKELY(first.m_object!=last.m_object))
    {
    JSON_THROW(invalid_iterator::create(210,"iteratorsdonotfit",*this));
    }

    if(JSON_HEDLEY_UNLIKELY(first.m_object==this))
    {
    JSON_THROW(invalid_iterator::create(211,"passediteratorsmaynotbelongtocontainer",*this));
    }

    //inserttoarrayandreturniterator
    returnset_parents(insert_iterator(pos,first.m_it.array_iterator,last.m_it.array_iterator),std::distance(first,last));
    }

    iteratorinsert(const_iteratorpos,initializer_list_tilist)
    {
    //insertonlyworksforarrays
    if(JSON_HEDLEY_UNLIKELY(!is_array()))
    {
    JSON_THROW(type_error::create(309,"cannotuseinsert()with"+std::string(type_name()),*this));
    }

    //checkifiteratorposfitstothisJSONvalue
    if(JSON_HEDLEY_UNLIKELY(pos.m_object!=this))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratordoesnotfitcurrentvalue",*this));
    }

    //inserttoarrayandreturniterator
    returnset_parents(insert_iterator(pos,ilist.begin(),ilist.end()),static_cast<typenameiterator::difference_type>(ilist.size()));
    }

    voidinsert(const_iteratorfirst,const_iteratorlast)
    {
    //insertonlyworksforobjects
    if(JSON_HEDLEY_UNLIKELY(!is_object()))
    {
    JSON_THROW(type_error::create(309,"cannotuseinsert()with"+std::string(type_name()),*this));
    }

    //checkifrangeiteratorsbelongtothesameJSONobject
    if(JSON_HEDLEY_UNLIKELY(first.m_object!=last.m_object))
    {
    JSON_THROW(invalid_iterator::create(210,"iteratorsdonotfit",*this));
    }

    //passediteratorsmustbelongtoobjects
    if(JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratorsfirstandlastmustpointtoobjects",*this));
    }

    m_value.object->insert(first.m_it.object_iterator,last.m_it.object_iterator);
    }

    voidupdate(const_referencej)
    {
    //implicitlyconvertnullvaluetoanemptyobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value.object=create<object_t>();
    assert_invariant();
    }

    if(JSON_HEDLEY_UNLIKELY(!is_object()))
    {
    JSON_THROW(type_error::create(312,"cannotuseupdate()with"+std::string(type_name()),*this));
    }
    if(JSON_HEDLEY_UNLIKELY(!j.is_object()))
    {
    JSON_THROW(type_error::create(312,"cannotuseupdate()with"+std::string(j.type_name()),*this));
    }

    for(autoit=j.cbegin();it!=j.cend();++it)
    {
    m_value.object->operator[](it.key())=it.value();
    }
    }

    voidupdate(const_iteratorfirst,const_iteratorlast)
    {
    //implicitlyconvertnullvaluetoanemptyobject
    if(is_null())
    {
    m_type=value_t::object;
    m_value.object=create<object_t>();
    assert_invariant();
    }

    if(JSON_HEDLEY_UNLIKELY(!is_object()))
    {
    JSON_THROW(type_error::create(312,"cannotuseupdate()with"+std::string(type_name()),*this));
    }

    //checkifrangeiteratorsbelongtothesameJSONobject
    if(JSON_HEDLEY_UNLIKELY(first.m_object!=last.m_object))
    {
    JSON_THROW(invalid_iterator::create(210,"iteratorsdonotfit",*this));
    }

    //passediteratorsmustbelongtoobjects
    if(JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()
    ||!last.m_object->is_object()))
    {
    JSON_THROW(invalid_iterator::create(202,"iteratorsfirstandlastmustpointtoobjects",*this));
    }

    for(autoit=first;it!=last;++it)
    {
    m_value.object->operator[](it.key())=it.value();
    }
    }

    voidswap(referenceother)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::swap(m_type,other.m_type);
    std::swap(m_value,other.m_value);

    set_parents();
    other.set_parents();
    assert_invariant();
    }

    friendvoidswap(referenceleft,referenceright)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
    )
    {
    left.swap(right);
    }

    voidswap(array_t&other)//NOLINT(bugprone-exception-escape)
    {
    //swaponlyworksforarrays
    if(JSON_HEDLEY_LIKELY(is_array()))
    {
    std::swap(*(m_value.array),other);
    }
    else
    {
    JSON_THROW(type_error::create(310,"cannotuseswap()with"+std::string(type_name()),*this));
    }
    }

    voidswap(object_t&other)//NOLINT(bugprone-exception-escape)
    {
    //swaponlyworksforobjects
    if(JSON_HEDLEY_LIKELY(is_object()))
    {
    std::swap(*(m_value.object),other);
    }
    else
    {
    JSON_THROW(type_error::create(310,"cannotuseswap()with"+std::string(type_name()),*this));
    }
    }

    voidswap(string_t&other)//NOLINT(bugprone-exception-escape)
    {
    //swaponlyworksforstrings
    if(JSON_HEDLEY_LIKELY(is_string()))
    {
    std::swap(*(m_value.string),other);
    }
    else
    {
    JSON_THROW(type_error::create(310,"cannotuseswap()with"+std::string(type_name()),*this));
    }
    }

    voidswap(binary_t&other)//NOLINT(bugprone-exception-escape)
    {
    //swaponlyworksforstrings
    if(JSON_HEDLEY_LIKELY(is_binary()))
    {
    std::swap(*(m_value.binary),other);
    }
    else
    {
    JSON_THROW(type_error::create(310,"cannotuseswap()with"+std::string(type_name()),*this));
    }
    }

    voidswap(typenamebinary_t::container_type&other)//NOLINT(bugprone-exception-escape)
    {
    //swaponlyworksforstrings
    if(JSON_HEDLEY_LIKELY(is_binary()))
    {
    std::swap(*(m_value.binary),other);
    }
    else
    {
    JSON_THROW(type_error::create(310,"cannotuseswap()with"+std::string(type_name()),*this));
    }
    }

    public:
    //lexicographicalcomparisonoperators//

    friendbooloperator==(const_referencelhs,const_referencerhs)noexcept
    {
    constautolhs_type=lhs.type();
    constautorhs_type=rhs.type();

    if(lhs_type==rhs_type)
    {
    switch(lhs_type)
    {
    casevalue_t::array:
    return*lhs.m_value.array==*rhs.m_value.array;

    casevalue_t::object:
    return*lhs.m_value.object==*rhs.m_value.object;

    casevalue_t::null:
    returntrue;

    casevalue_t::string:
    return*lhs.m_value.string==*rhs.m_value.string;

    casevalue_t::boolean:
    returnlhs.m_value.boolean==rhs.m_value.boolean;

    casevalue_t::number_integer:
    returnlhs.m_value.number_integer==rhs.m_value.number_integer;

    casevalue_t::number_unsigned:
    returnlhs.m_value.number_unsigned==rhs.m_value.number_unsigned;

    casevalue_t::number_float:
    returnlhs.m_value.number_float==rhs.m_value.number_float;

    casevalue_t::binary:
    return*lhs.m_value.binary==*rhs.m_value.binary;

    default:
    returnfalse;
    }
    }
    elseif(lhs_type==value_t::number_integer&&rhs_type==value_t::number_float)
    {
    returnstatic_cast<number_float_t>(lhs.m_value.number_integer)==rhs.m_value.number_float;
    }
    elseif(lhs_type==value_t::number_float&&rhs_type==value_t::number_integer)
    {
    returnlhs.m_value.number_float==static_cast<number_float_t>(rhs.m_value.number_integer);
    }
    elseif(lhs_type==value_t::number_unsigned&&rhs_type==value_t::number_float)
    {
    returnstatic_cast<number_float_t>(lhs.m_value.number_unsigned)==rhs.m_value.number_float;
    }
    elseif(lhs_type==value_t::number_float&&rhs_type==value_t::number_unsigned)
    {
    returnlhs.m_value.number_float==static_cast<number_float_t>(rhs.m_value.number_unsigned);
    }
    elseif(lhs_type==value_t::number_unsigned&&rhs_type==value_t::number_integer)
    {
    returnstatic_cast<number_integer_t>(lhs.m_value.number_unsigned)==rhs.m_value.number_integer;
    }
    elseif(lhs_type==value_t::number_integer&&rhs_type==value_t::number_unsigned)
    {
    returnlhs.m_value.number_integer==static_cast<number_integer_t>(rhs.m_value.number_unsigned);
    }

    returnfalse;
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator==(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs==basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator==(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)==rhs;
    }

    friendbooloperator!=(const_referencelhs,const_referencerhs)noexcept
    {
    return!(lhs==rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator!=(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs!=basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator!=(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)!=rhs;
    }

    friendbooloperator<(const_referencelhs,const_referencerhs)noexcept
    {
    constautolhs_type=lhs.type();
    constautorhs_type=rhs.type();

    if(lhs_type==rhs_type)
    {
    switch(lhs_type)
    {
    casevalue_t::array:
    //noteparenthesesarenecessary,see
    //https://github.com/nlohmann/json/issues/1530
    return(*lhs.m_value.array)<(*rhs.m_value.array);

    casevalue_t::object:
    return(*lhs.m_value.object)<(*rhs.m_value.object);

    casevalue_t::null:
    returnfalse;

    casevalue_t::string:
    return(*lhs.m_value.string)<(*rhs.m_value.string);

    casevalue_t::boolean:
    return(lhs.m_value.boolean)<(rhs.m_value.boolean);

    casevalue_t::number_integer:
    return(lhs.m_value.number_integer)<(rhs.m_value.number_integer);

    casevalue_t::number_unsigned:
    return(lhs.m_value.number_unsigned)<(rhs.m_value.number_unsigned);

    casevalue_t::number_float:
    return(lhs.m_value.number_float)<(rhs.m_value.number_float);

    casevalue_t::binary:
    return(*lhs.m_value.binary)<(*rhs.m_value.binary);

    default:
    returnfalse;
    }
    }
    elseif(lhs_type==value_t::number_integer&&rhs_type==value_t::number_float)
    {
    returnstatic_cast<number_float_t>(lhs.m_value.number_integer)<rhs.m_value.number_float;
    }
    elseif(lhs_type==value_t::number_float&&rhs_type==value_t::number_integer)
    {
    returnlhs.m_value.number_float<static_cast<number_float_t>(rhs.m_value.number_integer);
    }
    elseif(lhs_type==value_t::number_unsigned&&rhs_type==value_t::number_float)
    {
    returnstatic_cast<number_float_t>(lhs.m_value.number_unsigned)<rhs.m_value.number_float;
    }
    elseif(lhs_type==value_t::number_float&&rhs_type==value_t::number_unsigned)
    {
    returnlhs.m_value.number_float<static_cast<number_float_t>(rhs.m_value.number_unsigned);
    }
    elseif(lhs_type==value_t::number_integer&&rhs_type==value_t::number_unsigned)
    {
    returnlhs.m_value.number_integer<static_cast<number_integer_t>(rhs.m_value.number_unsigned);
    }
    elseif(lhs_type==value_t::number_unsigned&&rhs_type==value_t::number_integer)
    {
    returnstatic_cast<number_integer_t>(lhs.m_value.number_unsigned)<rhs.m_value.number_integer;
    }

    //Weonlyreachthislineifwecannotcomparevalues.Inthatcase,
    //wecomparetypes.Notewehavetocalltheoperatorexplicitly,
    //becauseMSVChasproblemsotherwise.
    returnoperator<(lhs_type,rhs_type);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator<(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs<basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator<(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)<rhs;
    }

    friendbooloperator<=(const_referencelhs,const_referencerhs)noexcept
    {
    return!(rhs<lhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator<=(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs<=basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator<=(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)<=rhs;
    }

    friendbooloperator>(const_referencelhs,const_referencerhs)noexcept
    {
    return!(lhs<=rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator>(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs>basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator>(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)>rhs;
    }

    friendbooloperator>=(const_referencelhs,const_referencerhs)noexcept
    {
    return!(lhs<rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator>=(const_referencelhs,ScalarTyperhs)noexcept
    {
    returnlhs>=basic_json(rhs);
    }

    template<typenameScalarType,typenamestd::enable_if<
    std::is_scalar<ScalarType>::value,int>::type=0>
    friendbooloperator>=(ScalarTypelhs,const_referencerhs)noexcept
    {
    returnbasic_json(lhs)>=rhs;
    }

    //serialization//

    friendstd::ostream&operator<<(std::ostream&o,constbasic_json&j)
    {
    //readwidthmemberanduseitasindentationparameterifnonzero
    constboolpretty_print=o.width()>0;
    constautoindentation=pretty_print?o.width():0;

    //resetwidthto0forsubsequentcallstothisstream
    o.width(0);

    //dotheactualserialization
    serializers(detail::output_adapter<char>(o),o.fill());
    s.dump(j,pretty_print,false,static_cast<unsignedint>(indentation));
    returno;
    }

    JSON_HEDLEY_DEPRECATED_FOR(3.0.0,operator<<(std::ostream&,constbasic_json&))
    friendstd::ostream&operator>>(constbasic_json&j,std::ostream&o)
    {
    returno<<j;
    }

    //deserialization//

    template<typenameInputType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonparse(InputType&&i,
    constparser_callback_tcb=nullptr,
    constboolallow_exceptions=true,
    constboolignore_comments=false)
    {
    basic_jsonresult;
    parser(detail::input_adapter(std::forward<InputType>(i)),cb,allow_exceptions,ignore_comments).parse(true,result);
    returnresult;
    }

    template<typenameIteratorType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonparse(IteratorTypefirst,
    IteratorTypelast,
    constparser_callback_tcb=nullptr,
    constboolallow_exceptions=true,
    constboolignore_comments=false)
    {
    basic_jsonresult;
    parser(detail::input_adapter(std::move(first),std::move(last)),cb,allow_exceptions,ignore_comments).parse(true,result);
    returnresult;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,parse(ptr,ptr+len))
    staticbasic_jsonparse(detail::span_input_adapter&&i,
    constparser_callback_tcb=nullptr,
    constboolallow_exceptions=true,
    constboolignore_comments=false)
    {
    basic_jsonresult;
    parser(i.get(),cb,allow_exceptions,ignore_comments).parse(true,result);
    returnresult;
    }

    template<typenameInputType>
    staticboolaccept(InputType&&i,
    constboolignore_comments=false)
    {
    returnparser(detail::input_adapter(std::forward<InputType>(i)),nullptr,false,ignore_comments).accept(true);
    }

    template<typenameIteratorType>
    staticboolaccept(IteratorTypefirst,IteratorTypelast,
    constboolignore_comments=false)
    {
    returnparser(detail::input_adapter(std::move(first),std::move(last)),nullptr,false,ignore_comments).accept(true);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,accept(ptr,ptr+len))
    staticboolaccept(detail::span_input_adapter&&i,
    constboolignore_comments=false)
    {
    returnparser(i.get(),nullptr,false,ignore_comments).accept(true);
    }

    template<typenameInputType,typenameSAX>
    JSON_HEDLEY_NON_NULL(2)
    staticboolsax_parse(InputType&&i,SAX*sax,
    input_format_tformat=input_format_t::json,
    constboolstrict=true,
    constboolignore_comments=false)
    {
    autoia=detail::input_adapter(std::forward<InputType>(i));
    returnformat==input_format_t::json
    ?parser(std::move(ia),nullptr,true,ignore_comments).sax_parse(sax,strict)
    :detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format,sax,strict);
    }

    template<classIteratorType,classSAX>
    JSON_HEDLEY_NON_NULL(3)
    staticboolsax_parse(IteratorTypefirst,IteratorTypelast,SAX*sax,
    input_format_tformat=input_format_t::json,
    constboolstrict=true,
    constboolignore_comments=false)
    {
    autoia=detail::input_adapter(std::move(first),std::move(last));
    returnformat==input_format_t::json
    ?parser(std::move(ia),nullptr,true,ignore_comments).sax_parse(sax,strict)
    :detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format,sax,strict);
    }

    template<typenameSAX>
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,sax_parse(ptr,ptr+len,...))
    JSON_HEDLEY_NON_NULL(2)
    staticboolsax_parse(detail::span_input_adapter&&i,SAX*sax,
    input_format_tformat=input_format_t::json,
    constboolstrict=true,
    constboolignore_comments=false)
    {
    autoia=i.get();
    returnformat==input_format_t::json
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    ?parser(std::move(ia),nullptr,true,ignore_comments).sax_parse(sax,strict)
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    :detail::binary_reader<basic_json, decltype(ia), SAX>(std::move(ia)).sax_parse(format,sax,strict);
    }

    JSON_HEDLEY_DEPRECATED_FOR(3.0.0,operator>>(std::istream&,basic_json&))
    friendstd::istream&operator<<(basic_json&j,std::istream&i)
    {
    returnoperator>>(i,j);
    }

    friendstd::istream&operator>>(std::istream&i,basic_json&j)
    {
    parser(detail::input_adapter(i)).parse(false,j);
    returni;
    }

    //conveniencefunctions//

    JSON_HEDLEY_RETURNS_NON_NULL
    constchar*type_name()constnoexcept
    {
    {
    switch(m_type)
    {
    casevalue_t::null:
    return"null";
    casevalue_t::object:
    return"object";
    casevalue_t::array:
    return"array";
    casevalue_t::string:
    return"string";
    casevalue_t::boolean:
    return"boolean";
    casevalue_t::binary:
    return"binary";
    casevalue_t::discarded:
    return"discarded";
    default:
    return"number";
    }
    }
    }

    JSON_PRIVATE_UNLESS_TESTED:
    //membervariables//

    value_tm_type=value_t::null;

    json_valuem_value={};

    #ifJSON_DIAGNOSTICS
    basic_json*m_parent=nullptr;
    #endif

    //binaryserialization/deserialization//

    public:
    staticstd::vector<uint8_t>to_cbor(constbasic_json&j)
    {
    std::vector<uint8_t>result;
    to_cbor(j,result);
    returnresult;
    }

    staticvoidto_cbor(constbasic_json&j,detail::output_adapter<uint8_t>o)
    {
    binary_writer<uint8_t>(o).write_cbor(j);
    }

    staticvoidto_cbor(constbasic_json&j,detail::output_adapter<char>o)
    {
    binary_writer<char>(o).write_cbor(j);
    }

    staticstd::vector<uint8_t>to_msgpack(constbasic_json&j)
    {
    std::vector<uint8_t>result;
    to_msgpack(j,result);
    returnresult;
    }

    staticvoidto_msgpack(constbasic_json&j,detail::output_adapter<uint8_t>o)
    {
    binary_writer<uint8_t>(o).write_msgpack(j);
    }

    staticvoidto_msgpack(constbasic_json&j,detail::output_adapter<char>o)
    {
    binary_writer<char>(o).write_msgpack(j);
    }

    staticstd::vector<uint8_t>to_ubjson(constbasic_json&j,
    constbooluse_size=false,
    constbooluse_type=false)
    {
    std::vector<uint8_t>result;
    to_ubjson(j,result,use_size,use_type);
    returnresult;
    }

    staticvoidto_ubjson(constbasic_json&j,detail::output_adapter<uint8_t>o,
    constbooluse_size=false,constbooluse_type=false)
    {
    binary_writer<uint8_t>(o).write_ubjson(j,use_size,use_type);
    }

    staticvoidto_ubjson(constbasic_json&j,detail::output_adapter<char>o,
    constbooluse_size=false,constbooluse_type=false)
    {
    binary_writer<char>(o).write_ubjson(j,use_size,use_type);
    }

    staticstd::vector<uint8_t>to_bson(constbasic_json&j)
    {
    std::vector<uint8_t>result;
    to_bson(j,result);
    returnresult;
    }

    staticvoidto_bson(constbasic_json&j,detail::output_adapter<uint8_t>o)
    {
    binary_writer<uint8_t>(o).write_bson(j);
    }

    staticvoidto_bson(constbasic_json&j,detail::output_adapter<char>o)
    {
    binary_writer<char>(o).write_bson(j);
    }

    template<typenameInputType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_cbor(InputType&&i,
    constboolstrict=true,
    constboolallow_exceptions=true,
    constcbor_tag_handler_ttag_handler=cbor_tag_handler_t::error)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::forward<InputType>(i));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor,&sdp,strict,tag_handler);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameIteratorType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_cbor(IteratorTypefirst,IteratorTypelast,
    constboolstrict=true,
    constboolallow_exceptions=true,
    constcbor_tag_handler_ttag_handler=cbor_tag_handler_t::error)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::move(first),std::move(last));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor,&sdp,strict,tag_handler);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameT>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_cbor(ptr,ptr+len))
    staticbasic_jsonfrom_cbor(constT*ptr,std::size_tlen,
    constboolstrict=true,
    constboolallow_exceptions=true,
    constcbor_tag_handler_ttag_handler=cbor_tag_handler_t::error)
    {
    returnfrom_cbor(ptr,ptr+len,strict,allow_exceptions,tag_handler);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_cbor(ptr,ptr+len))
    staticbasic_jsonfrom_cbor(detail::span_input_adapter&&i,
    constboolstrict=true,
    constboolallow_exceptions=true,
    constcbor_tag_handler_ttag_handler=cbor_tag_handler_t::error)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=i.get();
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::cbor,&sdp,strict,tag_handler);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameInputType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_msgpack(InputType&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::forward<InputType>(i));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameIteratorType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_msgpack(IteratorTypefirst,IteratorTypelast,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::move(first),std::move(last));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameT>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_msgpack(ptr,ptr+len))
    staticbasic_jsonfrom_msgpack(constT*ptr,std::size_tlen,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    returnfrom_msgpack(ptr,ptr+len,strict,allow_exceptions);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_msgpack(ptr,ptr+len))
    staticbasic_jsonfrom_msgpack(detail::span_input_adapter&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=i.get();
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::msgpack,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameInputType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_ubjson(InputType&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::forward<InputType>(i));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameIteratorType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_ubjson(IteratorTypefirst,IteratorTypelast,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::move(first),std::move(last));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameT>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_ubjson(ptr,ptr+len))
    staticbasic_jsonfrom_ubjson(constT*ptr,std::size_tlen,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    returnfrom_ubjson(ptr,ptr+len,strict,allow_exceptions);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_ubjson(ptr,ptr+len))
    staticbasic_jsonfrom_ubjson(detail::span_input_adapter&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=i.get();
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::ubjson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameInputType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_bson(InputType&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::forward<InputType>(i));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameIteratorType>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsonfrom_bson(IteratorTypefirst,IteratorTypelast,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=detail::input_adapter(std::move(first),std::move(last));
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    template<typenameT>
    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_bson(ptr,ptr+len))
    staticbasic_jsonfrom_bson(constT*ptr,std::size_tlen,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    returnfrom_bson(ptr,ptr+len,strict,allow_exceptions);
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    JSON_HEDLEY_DEPRECATED_FOR(3.8.0,from_bson(ptr,ptr+len))
    staticbasic_jsonfrom_bson(detail::span_input_adapter&&i,
    constboolstrict=true,
    constboolallow_exceptions=true)
    {
    basic_jsonresult;
    detail::json_sax_dom_parser<basic_json>sdp(result,allow_exceptions);
    autoia=i.get();
    //NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg)
    constboolres=binary_reader<decltype(ia)>(std::move(ia)).sax_parse(input_format_t::bson,&sdp,strict);
    returnres?result:basic_json(value_t::discarded);
    }

    //JSONPointersupport//

    referenceoperator[](constjson_pointer&ptr)
    {
    returnptr.get_unchecked(this);
    }

    const_referenceoperator[](constjson_pointer&ptr)const
    {
    returnptr.get_unchecked(this);
    }

    referenceat(constjson_pointer&ptr)
    {
    returnptr.get_checked(this);
    }

    const_referenceat(constjson_pointer&ptr)const
    {
    returnptr.get_checked(this);
    }

    basic_jsonflatten()const
    {
    basic_jsonresult(value_t::object);
    json_pointer::flatten("",*this,result);
    returnresult;
    }

    basic_jsonunflatten()const
    {
    returnjson_pointer::unflatten(*this);
    }

    //JSONPatchfunctions//

    basic_jsonpatch(constbasic_json&json_patch)const
    {
    //makeaworkingcopytoapplythepatchto
    basic_jsonresult=*this;

    //thevalidJSONPatchoperations
    enumclasspatch_operations{add,remove,replace,move,copy,test,invalid};

    constautoget_op=[](conststd::string&op)
    {
    if(op=="add")
    {
    returnpatch_operations::add;
    }
    if(op=="remove")
    {
    returnpatch_operations::remove;
    }
    if(op=="replace")
    {
    returnpatch_operations::replace;
    }
    if(op=="move")
    {
    returnpatch_operations::move;
    }
    if(op=="copy")
    {
    returnpatch_operations::copy;
    }
    if(op=="test")
    {
    returnpatch_operations::test;
    }

    returnpatch_operations::invalid;
    };

    //wrapperfor"add"operation;addvalueatptr
    constautooperation_add=[&result](json_pointer&ptr,basic_jsonval)
    {
    //addingtotherootofthetargetdocumentmeansreplacingit
    if(ptr.empty())
    {
    result=val;
    return;
    }

    //makesurethetopelementofthepointerexists
    json_pointertop_pointer=ptr.top();
    if(top_pointer!=ptr)
    {
    result.at(top_pointer);
    }

    //getreferencetoparentofJSONpointerptr
    constautolast_path=ptr.back();
    ptr.pop_back();
    basic_json&parent=result[ptr];

    switch(parent.m_type)
    {
    casevalue_t::null:
    casevalue_t::object:
    {
    //useoperator[]toaddvalue
    parent[last_path]=val;
    break;
    }

    casevalue_t::array:
    {
    if(last_path=="-")
    {
    //specialcase:appendtoback
    parent.push_back(val);
    }
    else
    {
    constautoidx=json_pointer::array_index(last_path);
    if(JSON_HEDLEY_UNLIKELY(idx>parent.size()))
    {
    //avoidundefinedbehavior
    JSON_THROW(out_of_range::create(401,"arrayindex"+std::to_string(idx)+"isoutofrange",parent));
    }

    //defaultcase:insertaddoffset
    parent.insert(parent.begin()+static_cast<difference_type>(idx),val);
    }
    break;
    }

    //ifthereexistsaparentitcannotbeprimitive
    default://LCOV_EXCL_LINE
    JSON_ASSERT(false);//NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)LCOV_EXCL_LINE
    }
    };

    //wrapperfor"remove"operation;removevalueatptr
    constautooperation_remove=[this,&result](json_pointer&ptr)
    {
    //getreferencetoparentofJSONpointerptr
    constautolast_path=ptr.back();
    ptr.pop_back();
    basic_json&parent=result.at(ptr);

    //removechild
    if(parent.is_object())
    {
    //performrangecheck
    autoit=parent.find(last_path);
    if(JSON_HEDLEY_LIKELY(it!=parent.end()))
    {
    parent.erase(it);
    }
    else
    {
    JSON_THROW(out_of_range::create(403,"key'"+last_path+"'notfound",*this));
    }
    }
    elseif(parent.is_array())
    {
    //noteeraseperformsrangecheck
    parent.erase(json_pointer::array_index(last_path));
    }
    };

    //typecheck:toplevelvaluemustbeanarray
    if(JSON_HEDLEY_UNLIKELY(!json_patch.is_array()))
    {
    JSON_THROW(parse_error::create(104,0,"JSONpatchmustbeanarrayofobjects",json_patch));
    }

    //iterateandapplytheoperations
    for(constauto&val:json_patch)
    {
    //wrappertogetavalueforanoperation
    constautoget_value=[&val](conststd::string&op,
    conststd::string&member,
    boolstring_type)->basic_json&
    {
    //findvalue
    autoit=val.m_value.object->find(member);

    //context-sensitiveerrormessage
    constautoerror_msg=(op=="op")?"operation":"operation'"+op+"'";

    //checkifdesiredvalueispresent
    if(JSON_HEDLEY_UNLIKELY(it==val.m_value.object->end()))
    {
    //NOLINTNEXTLINE(performance-inefficient-string-concatenation)
    JSON_THROW(parse_error::create(105,0,error_msg+"musthavemember'"+member+"'",val));
    }

    //checkifresultisoftypestring
    if(JSON_HEDLEY_UNLIKELY(string_type&&!it->second.is_string()))
    {
    //NOLINTNEXTLINE(performance-inefficient-string-concatenation)
    JSON_THROW(parse_error::create(105,0,error_msg+"musthavestringmember'"+member+"'",val));
    }

    //noerror:returnvalue
    returnit->second;
    };

    //typecheck:everyelementofthearraymustbeanobject
    if(JSON_HEDLEY_UNLIKELY(!val.is_object()))
    {
    JSON_THROW(parse_error::create(104,0,"JSONpatchmustbeanarrayofobjects",val));
    }

    //collectmandatorymembers
    constautoop=get_value("op","op",true).templateget<std::string>();
    constautopath=get_value(op,"path",true).templateget<std::string>();
    json_pointerptr(path);

    switch(get_op(op))
    {
    casepatch_operations::add:
    {
    operation_add(ptr,get_value("add","value",false));
    break;
    }

    casepatch_operations::remove:
    {
    operation_remove(ptr);
    break;
    }

    casepatch_operations::replace:
    {
    //the"path"locationmustexist-useat()
    result.at(ptr)=get_value("replace","value",false);
    break;
    }

    casepatch_operations::move:
    {
    constautofrom_path=get_value("move","from",true).templateget<std::string>();
    json_pointerfrom_ptr(from_path);

    //the"from"locationmustexist-useat()
    basic_jsonv=result.at(from_ptr);

    //Themoveoperationisfunctionallyidenticaltoa
    //"remove"operationonthe"from"location,followed
    //immediatelybyan"add"operationatthetarget
    //locationwiththevaluethatwasjustremoved.
    operation_remove(from_ptr);
    operation_add(ptr,v);
    break;
    }

    casepatch_operations::copy:
    {
    constautofrom_path=get_value("copy","from",true).templateget<std::string>();
    constjson_pointerfrom_ptr(from_path);

    //the"from"locationmustexist-useat()
    basic_jsonv=result.at(from_ptr);

    //Thecopyisfunctionallyidenticaltoan"add"
    //operationatthetargetlocationusingthevalue
    //specifiedinthe"from"member.
    operation_add(ptr,v);
    break;
    }

    casepatch_operations::test:
    {
    boolsuccess=false;
    JSON_TRY
    {
    //checkif"value"matchestheoneat"path"
    //the"path"locationmustexist-useat()
    success=(result.at(ptr)==get_value("test","value",false));
    }
    JSON_INTERNAL_CATCH(out_of_range&)
    {
    //ignoreoutofrangeerrors:successremainsfalse
    }

    //throwanexceptioniftestfails
    if(JSON_HEDLEY_UNLIKELY(!success))
    {
    JSON_THROW(other_error::create(501,"unsuccessful:"+val.dump(),val));
    }

    break;
    }

    default:
    {
    //opmustbe"add","remove","replace","move","copy",or
    //"test"
    JSON_THROW(parse_error::create(105,0,"operationvalue'"+op+"'isinvalid",val));
    }
    }
    }

    returnresult;
    }

    JSON_HEDLEY_WARN_UNUSED_RESULT
    staticbasic_jsondiff(constbasic_json&source,constbasic_json&target,
    conststd::string&path="")
    {
    //thepatch
    basic_jsonresult(value_t::array);

    //ifthevaluesarethesame,returnemptypatch
    if(source==target)
    {
    returnresult;
    }

    if(source.type()!=target.type())
    {
    //differenttypes:replacevalue
    result.push_back(
    {
    {"op","replace"},{"path",path},{"value",target}
    });
    returnresult;
    }

    switch(source.type())
    {
    casevalue_t::array:
    {
    //firstpass:traversecommonelements
    std::size_ti=0;
    while(i<source.size()&&i<target.size())
    {
    //recursivecalltocomparearrayvaluesatindexi
    autotemp_diff=diff(source[i],target[i],path+"/"+std::to_string(i));
    result.insert(result.end(),temp_diff.begin(),temp_diff.end());
    ++i;
    }

    //inowreachedtheendofatleastonearray
    //inasecondpass,traversetheremainingelements

    //removemyremainingelements
    constautoend_index=static_cast<difference_type>(result.size());
    while(i<source.size())
    {
    //addoperationsinreverseordertoavoidinvalid
    //indices
    result.insert(result.begin()+end_index,object(
    {
    {"op","remove"},
    {"path",path+"/"+std::to_string(i)}
    }));
    ++i;
    }

    //addotherremainingelements
    while(i<target.size())
    {
    result.push_back(
    {
    {"op","add"},
    {"path",path+"/-"},
    {"value",target[i]}
    });
    ++i;
    }

    break;
    }

    casevalue_t::object:
    {
    //firstpass:traversethisobject'selements
    for(autoit=source.cbegin();it!=source.cend();++it)
    {
    //escapethekeynametobeusedinaJSONpatch
    constautopath_key=path+"/"+detail::escape(it.key());

    if(target.find(it.key())!=target.end())
    {
    //recursivecalltocompareobjectvaluesatkeyit
    autotemp_diff=diff(it.value(),target[it.key()],path_key);
    result.insert(result.end(),temp_diff.begin(),temp_diff.end());
    }
    else
    {
    //foundakeythatisnotino->removeit
    result.push_back(object(
    {
    {"op","remove"},{"path",path_key}
    }));
    }
    }

    //secondpass:traverseotherobject'selements
    for(autoit=target.cbegin();it!=target.cend();++it)
    {
    if(source.find(it.key())==source.end())
    {
    //foundakeythatisnotinthis->addit
    constautopath_key=path+"/"+detail::escape(it.key());
    result.push_back(
    {
    {"op","add"},{"path",path_key},
    {"value",it.value()}
    });
    }
    }

    break;
    }

    default:
    {
    //bothprimitivetype:replacevalue
    result.push_back(
    {
    {"op","replace"},{"path",path},{"value",target}
    });
    break;
    }
    }

    returnresult;
    }

    //JSONMergePatchfunctions//

    voidmerge_patch(constbasic_json&apply_patch)
    {
    if(apply_patch.is_object())
    {
    if(!is_object())
    {
    *this=object();
    }
    for(autoit=apply_patch.begin();it!=apply_patch.end();++it)
    {
    if(it.value().is_null())
    {
    erase(it.key());
    }
    else
    {
    operator[](it.key()).merge_patch(it.value());
    }
    }
    }
    else
    {
    *this=apply_patch;
    }
    }

    };

    NLOHMANN_BASIC_JSON_TPL_DECLARATION
    std::stringto_string(constNLOHMANN_BASIC_JSON_TPL&j)
    {
    returnj.dump();
    }
    }//namespacenlohmann

    //nonmembersupport//

    //specializationofstd::swap,andstd::hash
    namespacestd
    {

    template<>
    structhash<nlohmann::json>
    {
    std::size_toperator()(constnlohmann::json&j)const
    {
    returnnlohmann::detail::hash(j);
    }
    };

    template<>
    structless<::nlohmann::detail::value_t>
    {
    booloperator()(nlohmann::detail::value_tlhs,
    nlohmann::detail::value_trhs)constnoexcept
    {
    returnnlohmann::detail::operator<(lhs,rhs);
    }
    };

    //C++20prohibitfunctionspecializationinthestdnamespace.
    #ifndefJSON_HAS_CPP_20

    template<>
    inlinevoidswap<nlohmann::json>(nlohmann::json&j1,nlohmann::json&j2)noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name)
    is_nothrow_move_constructible<nlohmann::json>::value&&//NOLINT(misc-redundant-expression)
    is_nothrow_move_assignable<nlohmann::json>::value
    )
    {
    j1.swap(j2);
    }

    #endif

    }//namespacestd

    JSON_HEDLEY_NON_NULL(1)
    inlinenlohmann::jsonoperator""_json(constchar*s,std::size_tn)
    {
    returnnlohmann::json::parse(s,s+n);
    }

    JSON_HEDLEY_NON_NULL(1)
    inlinenlohmann::json::json_pointeroperator""_json_pointer(constchar*s,std::size_tn)
    {
    returnnlohmann::json::json_pointer(std::string(s,n));
    }

    //#include<nlohmann/detail/macro_unscope.hpp>

    //restoreGCC/clangdiagnosticsettings
    #ifdefined(__clang__)
    #pragmaGCCdiagnosticpop
    #endif

    //cleanup
    #undefJSON_ASSERT
    #undefJSON_INTERNAL_CATCH
    #undefJSON_CATCH
    #undefJSON_THROW
    #undefJSON_TRY
    #undefJSON_PRIVATE_UNLESS_TESTED
    #undefJSON_HAS_CPP_14
    #undefJSON_HAS_CPP_17
    #undefNLOHMANN_BASIC_JSON_TPL_DECLARATION
    #undefNLOHMANN_BASIC_JSON_TPL
    #undefJSON_EXPLICIT

    //#include<nlohmann/thirdparty/hedley/hedley_undef.hpp>

    #undefJSON_HEDLEY_ALWAYS_INLINE
    #undefJSON_HEDLEY_ARM_VERSION
    #undefJSON_HEDLEY_ARM_VERSION_CHECK
    #undefJSON_HEDLEY_ARRAY_PARAM
    #undefJSON_HEDLEY_ASSUME
    #undefJSON_HEDLEY_BEGIN_C_DECLS
    #undefJSON_HEDLEY_CLANG_HAS_ATTRIBUTE
    #undefJSON_HEDLEY_CLANG_HAS_BUILTIN
    #undefJSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE
    #undefJSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE
    #undefJSON_HEDLEY_CLANG_HAS_EXTENSION
    #undefJSON_HEDLEY_CLANG_HAS_FEATURE
    #undefJSON_HEDLEY_CLANG_HAS_WARNING
    #undefJSON_HEDLEY_COMPCERT_VERSION
    #undefJSON_HEDLEY_COMPCERT_VERSION_CHECK
    #undefJSON_HEDLEY_CONCAT
    #undefJSON_HEDLEY_CONCAT3
    #undefJSON_HEDLEY_CONCAT3_EX
    #undefJSON_HEDLEY_CONCAT_EX
    #undefJSON_HEDLEY_CONST
    #undefJSON_HEDLEY_CONSTEXPR
    #undefJSON_HEDLEY_CONST_CAST
    #undefJSON_HEDLEY_CPP_CAST
    #undefJSON_HEDLEY_CRAY_VERSION
    #undefJSON_HEDLEY_CRAY_VERSION_CHECK
    #undefJSON_HEDLEY_C_DECL
    #undefJSON_HEDLEY_DEPRECATED
    #undefJSON_HEDLEY_DEPRECATED_FOR
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS
    #undefJSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION
    #undefJSON_HEDLEY_DIAGNOSTIC_POP
    #undefJSON_HEDLEY_DIAGNOSTIC_PUSH
    #undefJSON_HEDLEY_DMC_VERSION
    #undefJSON_HEDLEY_DMC_VERSION_CHECK
    #undefJSON_HEDLEY_EMPTY_BASES
    #undefJSON_HEDLEY_EMSCRIPTEN_VERSION
    #undefJSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK
    #undefJSON_HEDLEY_END_C_DECLS
    #undefJSON_HEDLEY_FLAGS
    #undefJSON_HEDLEY_FLAGS_CAST
    #undefJSON_HEDLEY_GCC_HAS_ATTRIBUTE
    #undefJSON_HEDLEY_GCC_HAS_BUILTIN
    #undefJSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE
    #undefJSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE
    #undefJSON_HEDLEY_GCC_HAS_EXTENSION
    #undefJSON_HEDLEY_GCC_HAS_FEATURE
    #undefJSON_HEDLEY_GCC_HAS_WARNING
    #undefJSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK
    #undefJSON_HEDLEY_GCC_VERSION
    #undefJSON_HEDLEY_GCC_VERSION_CHECK
    #undefJSON_HEDLEY_GNUC_HAS_ATTRIBUTE
    #undefJSON_HEDLEY_GNUC_HAS_BUILTIN
    #undefJSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE
    #undefJSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE
    #undefJSON_HEDLEY_GNUC_HAS_EXTENSION
    #undefJSON_HEDLEY_GNUC_HAS_FEATURE
    #undefJSON_HEDLEY_GNUC_HAS_WARNING
    #undefJSON_HEDLEY_GNUC_VERSION
    #undefJSON_HEDLEY_GNUC_VERSION_CHECK
    #undefJSON_HEDLEY_HAS_ATTRIBUTE
    #undefJSON_HEDLEY_HAS_BUILTIN
    #undefJSON_HEDLEY_HAS_CPP_ATTRIBUTE
    #undefJSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS
    #undefJSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE
    #undefJSON_HEDLEY_HAS_EXTENSION
    #undefJSON_HEDLEY_HAS_FEATURE
    #undefJSON_HEDLEY_HAS_WARNING
    #undefJSON_HEDLEY_IAR_VERSION
    #undefJSON_HEDLEY_IAR_VERSION_CHECK
    #undefJSON_HEDLEY_IBM_VERSION
    #undefJSON_HEDLEY_IBM_VERSION_CHECK
    #undefJSON_HEDLEY_IMPORT
    #undefJSON_HEDLEY_INLINE
    #undefJSON_HEDLEY_INTEL_CL_VERSION
    #undefJSON_HEDLEY_INTEL_CL_VERSION_CHECK
    #undefJSON_HEDLEY_INTEL_VERSION
    #undefJSON_HEDLEY_INTEL_VERSION_CHECK
    #undefJSON_HEDLEY_IS_CONSTANT
    #undefJSON_HEDLEY_IS_CONSTEXPR_
    #undefJSON_HEDLEY_LIKELY
    #undefJSON_HEDLEY_MALLOC
    #undefJSON_HEDLEY_MCST_LCC_VERSION
    #undefJSON_HEDLEY_MCST_LCC_VERSION_CHECK
    #undefJSON_HEDLEY_MESSAGE
    #undefJSON_HEDLEY_MSVC_VERSION
    #undefJSON_HEDLEY_MSVC_VERSION_CHECK
    #undefJSON_HEDLEY_NEVER_INLINE
    #undefJSON_HEDLEY_NON_NULL
    #undefJSON_HEDLEY_NO_ESCAPE
    #undefJSON_HEDLEY_NO_RETURN
    #undefJSON_HEDLEY_NO_THROW
    #undefJSON_HEDLEY_NULL
    #undefJSON_HEDLEY_PELLES_VERSION
    #undefJSON_HEDLEY_PELLES_VERSION_CHECK
    #undefJSON_HEDLEY_PGI_VERSION
    #undefJSON_HEDLEY_PGI_VERSION_CHECK
    #undefJSON_HEDLEY_PREDICT
    #undefJSON_HEDLEY_PRINTF_FORMAT
    #undefJSON_HEDLEY_PRIVATE
    #undefJSON_HEDLEY_PUBLIC
    #undefJSON_HEDLEY_PURE
    #undefJSON_HEDLEY_REINTERPRET_CAST
    #undefJSON_HEDLEY_REQUIRE
    #undefJSON_HEDLEY_REQUIRE_CONSTEXPR
    #undefJSON_HEDLEY_REQUIRE_MSG
    #undefJSON_HEDLEY_RESTRICT
    #undefJSON_HEDLEY_RETURNS_NON_NULL
    #undefJSON_HEDLEY_SENTINEL
    #undefJSON_HEDLEY_STATIC_ASSERT
    #undefJSON_HEDLEY_STATIC_CAST
    #undefJSON_HEDLEY_STRINGIFY
    #undefJSON_HEDLEY_STRINGIFY_EX
    #undefJSON_HEDLEY_SUNPRO_VERSION
    #undefJSON_HEDLEY_SUNPRO_VERSION_CHECK
    #undefJSON_HEDLEY_TINYC_VERSION
    #undefJSON_HEDLEY_TINYC_VERSION_CHECK
    #undefJSON_HEDLEY_TI_ARMCL_VERSION
    #undefJSON_HEDLEY_TI_ARMCL_VERSION_CHECK
    #undefJSON_HEDLEY_TI_CL2000_VERSION
    #undefJSON_HEDLEY_TI_CL2000_VERSION_CHECK
    #undefJSON_HEDLEY_TI_CL430_VERSION
    #undefJSON_HEDLEY_TI_CL430_VERSION_CHECK
    #undefJSON_HEDLEY_TI_CL6X_VERSION
    #undefJSON_HEDLEY_TI_CL6X_VERSION_CHECK
    #undefJSON_HEDLEY_TI_CL7X_VERSION
    #undefJSON_HEDLEY_TI_CL7X_VERSION_CHECK
    #undefJSON_HEDLEY_TI_CLPRU_VERSION
    #undefJSON_HEDLEY_TI_CLPRU_VERSION_CHECK
    #undefJSON_HEDLEY_TI_VERSION
    #undefJSON_HEDLEY_TI_VERSION_CHECK
    #undefJSON_HEDLEY_UNAVAILABLE
    #undefJSON_HEDLEY_UNLIKELY
    #undefJSON_HEDLEY_UNPREDICTABLE
    #undefJSON_HEDLEY_UNREACHABLE
    #undefJSON_HEDLEY_UNREACHABLE_RETURN
    #undefJSON_HEDLEY_VERSION
    #undefJSON_HEDLEY_VERSION_DECODE_MAJOR
    #undefJSON_HEDLEY_VERSION_DECODE_MINOR
    #undefJSON_HEDLEY_VERSION_DECODE_REVISION
    #undefJSON_HEDLEY_VERSION_ENCODE
    #undefJSON_HEDLEY_WARNING
    #undefJSON_HEDLEY_WARN_UNUSED_RESULT
    #undefJSON_HEDLEY_WARN_UNUSED_RESULT_MSG
    #undefJSON_HEDLEY_FALL_THROUGH

    #endif//INCLUDE_NLOHMANN_JSON_HPP_