nlohmann::detail
nlohmann::detail::binary_reader
nlohmann::detail::binary_writer
nlohmann::detail::conjunction
nlohmann::detail::conjunction< B1 >
nlohmann::detail::conjunction< B1, Bn... >
nlohmann::detail::detector
nlohmann::detail::detector< Default, void_t< Op< Args... > >, Op, Args... >
nlohmann::detail::exception
nlohmann::detail::external_constructor
nlohmann::detail::external_constructor< value_t::array >
nlohmann::detail::external_constructor< value_t::binary >
nlohmann::detail::external_constructor< value_t::boolean >
nlohmann::detail::external_constructor< value_t::number_float >
nlohmann::detail::external_constructor< value_t::number_integer >
nlohmann::detail::external_constructor< value_t::number_unsigned >
nlohmann::detail::external_constructor< value_t::object >
nlohmann::detail::external_constructor< value_t::string >
nlohmann::detail::file_input_adapter
nlohmann::detail::from_json_fn
nlohmann::detail::has_from_json
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::identity_tag
nlohmann::detail::input_stream_adapter
nlohmann::detail::integer_sequence
nlohmann::detail::internal_iterator
nlohmann::detail::invalid_iterator
nlohmann::detail::is_basic_json
nlohmann::detail::is_basic_json< NLOHMANN_BASIC_JSON_TPL >
nlohmann::detail::is_compatible_array_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_integer_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_object_type
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_string_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_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_complete_type
nlohmann::detail::is_complete_type< T, decltype(void(sizeof(T)))>
nlohmann::detail::is_constructible
nlohmann::detail::is_constructible< const std::pair< T1, T2 > >
nlohmann::detail::is_constructible< const std::tuple< Ts... > >
nlohmann::detail::is_constructible< std::pair< T1, T2 > >
nlohmann::detail::is_constructible< std::tuple< Ts... > >
nlohmann::detail::is_constructible_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 &&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_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value > >
nlohmann::detail::is_constructible_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_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_tuple
nlohmann::detail::is_constructible_tuple< T1, std::tuple< Args... > >
nlohmann::detail::is_default_constructible
nlohmann::detail::is_default_constructible< const std::pair< T1, T2 > >
nlohmann::detail::is_default_constructible< const std::tuple< Ts... > >
nlohmann::detail::is_default_constructible< std::pair< T1, T2 > >
nlohmann::detail::is_default_constructible< std::tuple< Ts... > >
nlohmann::detail::is_getable
nlohmann::detail::is_iterator_of_multibyte
nlohmann::detail::is_iterator_traits
nlohmann::detail::is_iterator_traits< iterator_traits< T > >
nlohmann::detail::is_json_ref
nlohmann::detail::is_json_ref< json_ref< T > >
nlohmann::detail::is_sax
nlohmann::detail::is_sax_static_asserts
nlohmann::detail::iter_impl
nlohmann::detail::iteration_proxy
nlohmann::detail::iteration_proxy_value
nlohmann::detail::iterator_input_adapter
nlohmann::detail::iterator_input_adapter_factory
nlohmann::detail::iterator_input_adapter_factory< IteratorType, enable_if_t< is_iterator_of_multibyte< IteratorType >::value > >
nlohmann::detail::iterator_traits
nlohmann::detail::iterator_traits< T *, enable_if_t< std::is_object< T >::value > >
nlohmann::detail::iterator_traits< T, enable_if_t< !std::is_pointer< T >::value > >
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::json_ref
nlohmann::detail::json_reverse_iterator
nlohmann::detail::json_sax_acceptor
nlohmann::detail::json_sax_dom_callback_parser
nlohmann::detail::json_sax_dom_parser
nlohmann::detail::lexer
nlohmann::detail::lexer_base
nlohmann::detail::make_void
nlohmann::detail::nonesuch
nlohmann::detail::other_error
nlohmann::detail::out_of_range
nlohmann::detail::output_adapter
nlohmann::detail::output_adapter_protocol
nlohmann::detail::output_stream_adapter
nlohmann::detail::output_string_adapter
nlohmann::detail::output_vector_adapter
nlohmann::detail::parse_error
nlohmann::detail::parser
nlohmann::detail::position_t
nlohmann::detail::primitive_iterator_t
nlohmann::detail::priority_tag
nlohmann::detail::priority_tag< 0 >
nlohmann::detail::serializer
nlohmann::detail::span_input_adapter
nlohmann::detail::static_const
nlohmann::detail::to_json_fn
nlohmann::detail::type_error
nlohmann::detail::wide_string_input_adapter
nlohmann::detail::wide_string_input_helper
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 2 >
nlohmann::detail::wide_string_input_helper< BaseInputAdapter, 4 >
nlohmann::detail::container_input_adapter_factory_impl
nlohmann::detail::dtoa_impl
nlohmann::detail::utility_internal
value_t
null

null value

object

object (unordered set of name/value pairs)

array

array (ordered collection of values)

string

string value

boolean

boolean value

number_integer

number value (signed integer)

number_unsigned

number value (unsigned integer)

number_float

number value (floating-point)

binary

binary array (ordered collection of bytes)

discarded

discarded by the parser callback function

the JSON type enumeration

This enumeration collects the different JSON types. It is internally used to distinguish the stored values, and the functions basic_json::is_null(), basic_json::is_object(), basic_json::is_array(), basic_json::is_string(), basic_json::is_boolean(), basic_json::is_number() (with basic_json::is_number_integer(), basic_json::is_number_unsigned(), and basic_json::is_number_float()), basic_json::is_discarded(), basic_json::is_primitive(), and basic_json::is_structured() rely on it.

There are three enumeration entries (number_integer, number_unsigned, and number_float), because the library distinguishes these three types for numbers: basic_json::number_unsigned_t is used for unsigned integers, basic_json::number_integer_t is used for signed integers, and basic_json::number_float_t is used for floating-point numbers or to approximate integers which do not fit in the limits of their respective type.

see basic_json::basic_json(const value_t value_type) create a JSON value with the default value for a given type

version 1.0.0

input_format_t
json
cbor
msgpack
ubjson
bson

the supported input formats

cbor_tag_handler_t
error

throw a parse_error exception in case of a tag

ignore

ignore tags

how to treat CBOR tags

parse_event_t
object_start

the parser read `{` and started to process a JSON object

object_end

the parser read `}` and finished processing a JSON object

array_start

the parser read `[` and started to process a JSON array

array_end

the parser read `]` and finished processing a JSON array

key

the parser read a key of a value in an object

value

the parser finished reading a JSON value

error_handler_t
strict

throw a type_error exception in case of invalid UTF-8

replace

replace invalid UTF-8 sequences with U+FFFD

ignore

ignore invalid UTF-8 sequences

how to treat decoding errors

typename std::remove_cv< typename std::remove_reference< T >::type >::type using nlohmann::detail::uncvref_t = typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type uncvref_t
typename std::enable_if< B, T >::type using nlohmann::detail::enable_if_t = typedef typename std::enable_if<B, T>::type enable_if_t
integer_sequence< size_t, Ints... > using nlohmann::detail::index_sequence = typedef integer_sequence<size_t, Ints...> index_sequence
typename utility_internal::Gen< T, N >::type using nlohmann::detail::make_integer_sequence = typedef typename utility_internal::Gen<T, N>::type make_integer_sequence
make_integer_sequence< size_t, N > using nlohmann::detail::make_index_sequence = typedef make_integer_sequence<size_t, N> make_index_sequence
make_index_sequence< sizeof...(Ts)> using nlohmann::detail::index_sequence_for = typedef make_index_sequence<sizeof...(Ts)> index_sequence_for
typename make_void< Ts... >::type using nlohmann::detail::void_t = typedef typename make_void<Ts...>::type void_t
typename detector< nonesuch, void, Op, Args... >::value_t using nlohmann::detail::is_detected = typedef typename detector<nonesuch, void, Op, Args...>::value_t is_detected
typename detector< nonesuch, void, Op, Args... >::type using nlohmann::detail::detected_t = typedef typename detector<nonesuch, void, Op, Args...>::type detected_t
detector< Default, void, Op, Args... > using nlohmann::detail::detected_or = typedef detector<Default, void, Op, Args...> detected_or
typename detected_or< Default, Op, Args... >::type using nlohmann::detail::detected_or_t = typedef typename detected_or<Default, Op, Args...>::type detected_or_t
std::is_same< Expected, detected_t< Op, Args... > > using nlohmann::detail::is_detected_exact = typedef std::is_same<Expected, detected_t<Op, Args...> > is_detected_exact
std::is_convertible< detected_t< Op, Args... >, To > using nlohmann::detail::is_detected_convertible = typedef std::is_convertible<detected_t<Op, Args...>, To> is_detected_convertible
typename T::mapped_type using nlohmann::detail::mapped_type_t = typedef typename T::mapped_type mapped_type_t
typename T::key_type using nlohmann::detail::key_type_t = typedef typename T::key_type key_type_t
typename T::value_type using nlohmann::detail::value_type_t = typedef typename T::value_type value_type_t
typename T::difference_type using nlohmann::detail::difference_type_t = typedef typename T::difference_type difference_type_t
typename T::pointer using nlohmann::detail::pointer_t = typedef typename T::pointer pointer_t
typename T::reference using nlohmann::detail::reference_t = typedef typename T::reference reference_t
typename T::iterator_category using nlohmann::detail::iterator_category_t = typedef typename T::iterator_category iterator_category_t
typename T::iterator using nlohmann::detail::iterator_t = typedef typename T::iterator iterator_t
decltype(T::to_json(std::declval< Args >()...)) using nlohmann::detail::to_json_function = typedef decltype(T::to_json(std::declval<Args>()...)) to_json_function
decltype(T::from_json(std::declval< Args >()...)) using nlohmann::detail::from_json_function = typedef decltype(T::from_json(std::declval<Args>()...)) from_json_function
decltype(std::declval< T >().template get< U >()) using nlohmann::detail::get_template_function = typedef decltype(std::declval<T>().template get<U>()) get_template_function
decltype(input_adapter(std::declval< const char * >(), std::declval< const char * >())) using nlohmann::detail::contiguous_bytes_input_adapter = typedef decltype(input_adapter(std::declval<const char*>(), std::declval<const char*>())) contiguous_bytes_input_adapter
decltype(std::declval< T & >().null()) using nlohmann::detail::null_function_t = typedef decltype(std::declval<T&>().null()) null_function_t
decltype(std::declval< T & >().boolean(std::declval< bool >())) using nlohmann::detail::boolean_function_t = typedef decltype(std::declval<T&>().boolean(std::declval<bool>())) boolean_function_t
decltype(std::declval< T & >().number_integer(std::declval< Integer >())) using nlohmann::detail::number_integer_function_t = typedef decltype(std::declval<T&>().number_integer(std::declval<Integer>())) number_integer_function_t
decltype(std::declval< T & >().number_unsigned(std::declval< Unsigned >())) using nlohmann::detail::number_unsigned_function_t = typedef decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>())) number_unsigned_function_t
decltype(std::declval< T & >().number_float(std::declval< Float >(), std::declval< const String & >())) using nlohmann::detail::number_float_function_t = typedef decltype(std::declval<T&>().number_float( std::declval<Float>(), std::declval<const String&>())) number_float_function_t
decltype(std::declval< T & >().string(std::declval< String & >())) using nlohmann::detail::string_function_t = typedef decltype(std::declval<T&>().string(std::declval<String&>())) string_function_t
decltype(std::declval< T & >().binary(std::declval< Binary & >())) using nlohmann::detail::binary_function_t = typedef decltype(std::declval<T&>().binary(std::declval<Binary&>())) binary_function_t
decltype(std::declval< T & >().start_object(std::declval< std::size_t >())) using nlohmann::detail::start_object_function_t = typedef decltype(std::declval<T&>().start_object(std::declval<std::size_t>())) start_object_function_t
decltype(std::declval< T & >().key(std::declval< String & >())) using nlohmann::detail::key_function_t = typedef decltype(std::declval<T&>().key(std::declval<String&>())) key_function_t
decltype(std::declval< T & >().end_object()) using nlohmann::detail::end_object_function_t = typedef decltype(std::declval<T&>().end_object()) end_object_function_t
decltype(std::declval< T & >().start_array(std::declval< std::size_t >())) using nlohmann::detail::start_array_function_t = typedef decltype(std::declval<T&>().start_array(std::declval<std::size_t>())) start_array_function_t
decltype(std::declval< T & >().end_array()) using nlohmann::detail::end_array_function_t = typedef decltype(std::declval<T&>().end_array()) end_array_function_t
decltype(std::declval< T & >().parse_error(std::declval< std::size_t >(), std::declval< const std::string & >(), std::declval< const Exception & >())) using nlohmann::detail::parse_error_function_t = typedef decltype(std::declval<T&>().parse_error( std::declval<std::size_t>(), std::declval<const std::string&>(), std::declval<const Exception&>())) parse_error_function_t
std::function< bool(int, parse_event_t, BasicJsonType &)> using nlohmann::detail::parser_callback_t = typedef std::function<bool(int , parse_event_t , BasicJsonType& )> parser_callback_t
std::shared_ptr< output_adapter_protocol< CharType > > using nlohmann::detail::output_adapter_t = typedef std::shared_ptr<output_adapter_protocol<CharType> > output_adapter_t

a type to simplify interfaces

bool bool nlohmann::detail::operator< (const value_t lhs, const value_t rhs) noexcept operator< const value_t lhs const value_t rhs

comparison operator for JSON types

Returns an ordering that is similar to Python:

- order: null < boolean < number < object < array < string < binary

- furthermore, each type is not smaller than itself

- discarded values are not comparable

- binary is represented as a b"" string in python and directly comparable to a string; however, making a binary array directly comparable with a string would be surprising behavior in a JSON file.

version 1.0.0

std::less<::nlohmann::detail::value_t >::operator()
nlohmann::detail::iter_impl< BasicJsonType >::operator>=
void void nlohmann::detail::replace_substring (std::string &s, const std::string &f, const std::string &t) replace_substring std::string & s const std::string & f const std::string & t

replace all occurrences of a substring by another string

s

the string to manipulate; changed so that all occurrences of f are replaced with t

f

the substring to replace with t

t

the string to replace f

The search string f must not be empty. This precondition is enforced with an assertion.

version 2.0.0

JSON_ASSERT
escape
unescape
std::string std::string nlohmann::detail::escape (std::string s) escape std::string s

string escaping as described in RFC 6901 (Sect. 4)

s

string to escape

escaped string

Note the order of escaping "~" to "~0" and "/" to "~1" is important.
replace_substring
nlohmann::detail::exception::diagnostics
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::diff
nlohmann::json_pointer< BasicJsonType >::flatten
nlohmann::json_pointer< BasicJsonType >::to_string
void static void nlohmann::detail::unescape (std::string &s) unescape std::string & s

string unescaping as described in RFC 6901 (Sect. 4)

s

string to unescape

unescaped string

Note the order of escaping "~1" to "/" and "~0" to "~" is important.
replace_substring
nlohmann::json_pointer< BasicJsonType >::split
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename std::nullptr_t &n) from_json const BasicJsonType & j typename std::nullptr_t & n nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string nlohmann::detail::from_json_fn::operator()
typename BasicJsonType
typename ArithmeticType
enable_if_t< std::is_arithmetic< ArithmeticType >::value &&!std::is_same< ArithmeticType, typename BasicJsonType::boolean_t >::value, int > 0
void void nlohmann::detail::get_arithmetic_value (const BasicJsonType &j, ArithmeticType &val) get_arithmetic_value const BasicJsonType & j ArithmeticType & val nlohmann::detail::type_error::create JSON_THROW number_float number_integer number_unsigned string from_json
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::boolean_t &b) from_json const BasicJsonType & j typename BasicJsonType::boolean_t & b nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::string_t &s) from_json const BasicJsonType & j typename BasicJsonType::string_t & s nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string value
typename BasicJsonType
typename ConstructibleStringType
enable_if_t< is_constructible_string_type< BasicJsonType, ConstructibleStringType >::value &&!std::is_same< typename BasicJsonType::string_t, ConstructibleStringType >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, ConstructibleStringType &s) from_json const BasicJsonType & j ConstructibleStringType & s nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::number_float_t &val) from_json const BasicJsonType & j typename BasicJsonType::number_float_t & val get_arithmetic_value
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::number_unsigned_t &val) from_json const BasicJsonType & j typename BasicJsonType::number_unsigned_t & val get_arithmetic_value
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::number_integer_t &val) from_json const BasicJsonType & j typename BasicJsonType::number_integer_t & val get_arithmetic_value
typename BasicJsonType
typename EnumType
enable_if_t< std::is_enum< EnumType >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, EnumType &e) from_json const BasicJsonType & j EnumType & e get_arithmetic_value
typename BasicJsonType
typename T
typename Allocator
enable_if_t< is_getable< BasicJsonType, T >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, std::forward_list< T, Allocator > &l) from_json const BasicJsonType & j std::forward_list< T, Allocator > & l nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename T
enable_if_t< is_getable< BasicJsonType, T >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, std::valarray< T > &l) from_json const BasicJsonType & j std::valarray< T > & l nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename T
std::size_t N N
auto auto nlohmann::detail::from_json (const BasicJsonType &j, T(&arr)[N]) -> decltype(j.template get< T >(), void()) from_json const BasicJsonType & j T(&) arr [N]
typename BasicJsonType
void void nlohmann::detail::from_json_array_impl (const BasicJsonType &j, typename BasicJsonType::array_t &arr, priority_tag< 3 >) from_json_array_impl const BasicJsonType & j typename BasicJsonType::array_t & arr priority_tag< 3 > void
typename BasicJsonType
typename T
std::size_t N N
auto auto nlohmann::detail::from_json_array_impl (const BasicJsonType &j, std::array< T, N > &arr, priority_tag< 2 >) -> decltype(j.template get< T >(), void()) from_json_array_impl const BasicJsonType & j std::array< T, N > & arr priority_tag< 2 >
typename BasicJsonType
typename ConstructibleArrayType
enable_if_t< std::is_assignable< ConstructibleArrayType &, ConstructibleArrayType >::value, int > 0
auto auto nlohmann::detail::from_json_array_impl (const BasicJsonType &j, ConstructibleArrayType &arr, priority_tag< 1 >) -> decltype(arr.reserve(std::declval< typename ConstructibleArrayType::size_type >()), j.template get< typename ConstructibleArrayType::value_type >(), void()) from_json_array_impl const BasicJsonType & j ConstructibleArrayType & arr priority_tag< 1 >
typename BasicJsonType
typename ConstructibleArrayType
enable_if_t< std::is_assignable< ConstructibleArrayType &, ConstructibleArrayType >::value, int > 0
void void nlohmann::detail::from_json_array_impl (const BasicJsonType &j, ConstructibleArrayType &arr, priority_tag< 0 >) from_json_array_impl const BasicJsonType & j ConstructibleArrayType & arr priority_tag< 0 >
typename BasicJsonType
typename ConstructibleArrayType
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, typename BasicJsonType::binary_t >::value &&!is_basic_json< ConstructibleArrayType >::value, int > 0
auto auto nlohmann::detail::from_json (const BasicJsonType &j, ConstructibleArrayType &arr) -> decltype(from_json_array_impl(j, arr, priority_tag< 3 > from_json const BasicJsonType & j ConstructibleArrayType & arr
j template j template nlohmann::detail::get< typename ConstructibleArrayType::value_type > () get< typename ConstructibleArrayType::value_type >
j template j template nlohmann::detail::void ()) void nlohmann::detail::type_error::create from_json_array_impl JSON_HEDLEY_UNLIKELY JSON_THROW string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader cudnn_frontend::check_rule cudnn_frontend::get_heuristics_list nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse
typename BasicJsonType
typename T
std::size_t... Idx Idx
std::array< T, sizeof...(Idx)> std::array<T, sizeof...(Idx)> nlohmann::detail::from_json_inplace_array_impl (BasicJsonType &&j, identity_tag< std::array< T, sizeof...(Idx)>>, index_sequence< Idx... >) from_json_inplace_array_impl BasicJsonType && j identity_tag< std::array< T, sizeof...(Idx)>> index_sequence< Idx... > from_json
typename BasicJsonType
typename T
std::size_t N N
auto auto nlohmann::detail::from_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 > from_json BasicJsonType && j identity_tag< std::array< T, N >> tag nlohmann::detail::type_error::create from_json_inplace_array_impl JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
void void nlohmann::detail::from_json (const BasicJsonType &j, typename BasicJsonType::binary_t &bin) from_json const BasicJsonType & j typename BasicJsonType::binary_t & bin nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename ConstructibleObjectType
enable_if_t< is_constructible_object_type< BasicJsonType, ConstructibleObjectType >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, ConstructibleObjectType &obj) from_json const BasicJsonType & j ConstructibleObjectType & obj nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename ArithmeticType
enable_if_t< std::is_arithmetic< ArithmeticType >::value &&!std::is_same< ArithmeticType, typename BasicJsonType::number_unsigned_t >::value &&!std::is_same< ArithmeticType, typename BasicJsonType::number_integer_t >::value &&!std::is_same< ArithmeticType, typename BasicJsonType::number_float_t >::value &&!std::is_same< ArithmeticType, typename BasicJsonType::boolean_t >::value, int > 0
void void nlohmann::detail::from_json (const BasicJsonType &j, ArithmeticType &val) from_json const BasicJsonType & j ArithmeticType & val boolean nlohmann::detail::type_error::create JSON_THROW number_float number_integer number_unsigned string
typename BasicJsonType
typename... Args Args
std::size_t... Idx Idx
std::tuple< Args... > std::tuple<Args...> nlohmann::detail::from_json_tuple_impl_base (BasicJsonType &&j, index_sequence< Idx... >) from_json_tuple_impl_base BasicJsonType && j index_sequence< Idx... > from_json_tuple_impl
typename BasicJsonType
class A1
class A2
std::pair< A1, A2 > std::pair<A1, A2> nlohmann::detail::from_json_tuple_impl (BasicJsonType &&j, identity_tag< std::pair< A1, A2 >>, priority_tag< 0 >) from_json_tuple_impl BasicJsonType && j identity_tag< std::pair< A1, A2 >> priority_tag< 0 > from_json from_json_tuple_impl
typename BasicJsonType
typename A1
typename A2
void void nlohmann::detail::from_json_tuple_impl (BasicJsonType &&j, std::pair< A1, A2 > &p, priority_tag< 1 >) from_json_tuple_impl BasicJsonType && j std::pair< A1, A2 > & p priority_tag< 1 > from_json_tuple_impl
typename BasicJsonType
typename... Args Args
std::tuple< Args... > std::tuple<Args...> nlohmann::detail::from_json_tuple_impl (BasicJsonType &&j, identity_tag< std::tuple< Args... >>, priority_tag< 2 >) from_json_tuple_impl BasicJsonType && j identity_tag< std::tuple< Args... >> priority_tag< 2 > from_json_tuple_impl_base
typename BasicJsonType
typename... Args Args
void void nlohmann::detail::from_json_tuple_impl (BasicJsonType &&j, std::tuple< Args... > &t, priority_tag< 3 >) from_json_tuple_impl BasicJsonType && j std::tuple< Args... > & t priority_tag< 3 > from_json_tuple_impl_base
typename BasicJsonType
typename TupleRelated
auto auto nlohmann::detail::from_json (BasicJsonType &&j, TupleRelated &&t) -> decltype(from_json_tuple_impl(std::forward< BasicJsonType >(j), std::forward< TupleRelated >(t), priority_tag< 3 > from_json BasicJsonType && j TupleRelated && t nlohmann::detail::type_error::create from_json_tuple_impl JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename Key
typename Value
typename Compare
typename Allocator
typename enable_if_t < !std::is_constructible < typename BasicJsonType::string_t, Key >::value >
void void nlohmann::detail::from_json (const BasicJsonType &j, std::map< Key, Value, Compare, Allocator > &m) from_json const BasicJsonType & j std::map< Key, Value, Compare, Allocator > & m nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string
typename BasicJsonType
typename Key
typename Value
typename Hash
typename KeyEqual
typename Allocator
typename enable_if_t < !std::is_constructible < typename BasicJsonType::string_t, Key >::value >
void void nlohmann::detail::from_json (const BasicJsonType &j, std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > &m) from_json const BasicJsonType & j std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > & m nlohmann::detail::type_error::create JSON_HEDLEY_UNLIKELY JSON_THROW string nlohmann::adl_serializer< ValueType, typename >::from_json 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_to
typename string_type
void void nlohmann::detail::int_to_string (string_type &target, std::size_t value) int_to_string string_type & target std::size_t value nlohmann::to_string nlohmann::detail::iteration_proxy_value< IteratorType >::key
std::size_t N N
typename IteratorType
enable_if_t< N==0, int > 0
auto auto nlohmann::detail::get (const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key()) get const nlohmann::detail::iteration_proxy_value< IteratorType > & i nlohmann::detail::iteration_proxy_value< IteratorType >::key
typename BasicJsonType
typename T
enable_if_t< std::is_same< T, typename BasicJsonType::boolean_t >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, T b) noexcept to_json BasicJsonType & j T b nlohmann::detail::to_json_fn::operator() to_json_tuple_impl
typename BasicJsonType
typename CompatibleString
enable_if_t< std::is_constructible< typename BasicJsonType::string_t, CompatibleString >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const CompatibleString &s) to_json BasicJsonType & j const CompatibleString & s
typename BasicJsonType
void void nlohmann::detail::to_json (BasicJsonType &j, typename BasicJsonType::string_t &&s) to_json BasicJsonType & j typename BasicJsonType::string_t && s
typename BasicJsonType
typename FloatType
enable_if_t< std::is_floating_point< FloatType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, FloatType val) noexcept to_json BasicJsonType & j FloatType val
typename BasicJsonType
typename CompatibleNumberUnsignedType
enable_if_t< is_compatible_integer_type< typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, CompatibleNumberUnsignedType val) noexcept to_json BasicJsonType & j CompatibleNumberUnsignedType val
typename BasicJsonType
typename CompatibleNumberIntegerType
enable_if_t< is_compatible_integer_type< typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, CompatibleNumberIntegerType val) noexcept to_json BasicJsonType & j CompatibleNumberIntegerType val
typename BasicJsonType
typename EnumType
enable_if_t< std::is_enum< EnumType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, EnumType e) noexcept to_json BasicJsonType & j EnumType e
typename BasicJsonType
void void nlohmann::detail::to_json (BasicJsonType &j, const std::vector< bool > &e) to_json BasicJsonType & j const std::vector< bool > & e
typename BasicJsonType
typename CompatibleArrayType
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< typename BasicJsonType::binary_t, CompatibleArrayType >::value &&!is_basic_json< CompatibleArrayType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const CompatibleArrayType &arr) to_json BasicJsonType & j const CompatibleArrayType & arr
typename BasicJsonType
void void nlohmann::detail::to_json (BasicJsonType &j, const typename BasicJsonType::binary_t &bin) to_json BasicJsonType & j const typename BasicJsonType::binary_t & bin
typename BasicJsonType
typename T
enable_if_t< std::is_convertible< T, BasicJsonType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const std::valarray< T > &arr) to_json BasicJsonType & j const std::valarray< T > & arr
typename BasicJsonType
void void nlohmann::detail::to_json (BasicJsonType &j, typename BasicJsonType::array_t &&arr) to_json BasicJsonType & j typename BasicJsonType::array_t && arr
typename BasicJsonType
typename CompatibleObjectType
enable_if_t< is_compatible_object_type< BasicJsonType, CompatibleObjectType >::value &&!is_basic_json< CompatibleObjectType >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const CompatibleObjectType &obj) to_json BasicJsonType & j const CompatibleObjectType & obj
typename BasicJsonType
void void nlohmann::detail::to_json (BasicJsonType &j, typename BasicJsonType::object_t &&obj) to_json BasicJsonType & j typename BasicJsonType::object_t && obj value
typename BasicJsonType
typename T
std::size_t N N
enable_if_t< !std::is_constructible< typename BasicJsonType::string_t, const T(&)[N]>::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const T(&arr)[N]) to_json BasicJsonType & j const T(&) arr [N]
typename BasicJsonType
typename T1
typename T2
enable_if_t< std::is_constructible< BasicJsonType, T1 >::value &&std::is_constructible< BasicJsonType, T2 >::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const std::pair< T1, T2 > &p) to_json BasicJsonType & j const std::pair< T1, T2 > & p value
typename BasicJsonType
typename T
enable_if_t< std::is_same< T, iteration_proxy_value< typename BasicJsonType::iterator >>::value, int > 0
void void nlohmann::detail::to_json (BasicJsonType &j, const T &b) to_json BasicJsonType & j const T & b nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json nlohmann::adl_serializer< ValueType, typename >::to_json
typename BasicJsonType
typename Tuple
std::size_t... Idx Idx
void void nlohmann::detail::to_json_tuple_impl (BasicJsonType &j, const Tuple &t, index_sequence< Idx... >) to_json_tuple_impl BasicJsonType & j const Tuple & t index_sequence< Idx... > to_json value
std::size_t std::size_t nlohmann::detail::combine (std::size_t seed, std::size_t h) noexcept combine std::size_t seed std::size_t h hash
typename BasicJsonType
std::size_t std::size_t nlohmann::detail::hash (const BasicJsonType &j) hash const BasicJsonType & j

hash a JSON value

The hash function tries to rely on std::hash where possible. Furthermore, the type of the JSON value is taken into account to have different hash values for null, 0, 0U, and false, etc.

BasicJsonType

basic_json specialization

j

JSON value to hash

hash value of j

combine
JSON_ASSERT
std::hash< nlohmann::json >::operator()
typename IteratorType
iterator_input_adapter_factory< IteratorType >::adapter_type iterator_input_adapter_factory<IteratorType>::adapter_type nlohmann::detail::input_adapter (IteratorType first, IteratorType last) input_adapter IteratorType first IteratorType last nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::accept nlohmann::detail::container_input_adapter_factory_impl::container_input_adapter_factory< ContainerType, void_t< decltype(begin(std::declval< ContainerType >()), end(std::declval< ContainerType >()))> >::create 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::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number input_adapter 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
typename ContainerType
container_input_adapter_factory_impl::container_input_adapter_factory< ContainerType >::adapter_type container_input_adapter_factory_impl::container_input_adapter_factory<ContainerType>::adapter_type nlohmann::detail::input_adapter (const ContainerType &container) input_adapter const ContainerType & container
file_input_adapter file_input_adapter nlohmann::detail::input_adapter (std::FILE *file) input_adapter std::FILE * file
input_stream_adapter input_stream_adapter nlohmann::detail::input_adapter (std::istream &stream) input_adapter std::istream & stream
input_stream_adapter input_stream_adapter nlohmann::detail::input_adapter (std::istream &&stream) input_adapter std::istream && stream
typename CharT
typename std::enable_if< std::is_pointer< CharT >::value &&!std::is_array< CharT >::value &&std::is_integral< typename std::remove_pointer< CharT >::type >::value &&sizeof(typename std::remove_pointer< CharT >::type)==1, int >::type 0
contiguous_bytes_input_adapter contiguous_bytes_input_adapter nlohmann::detail::input_adapter (CharT b) input_adapter CharT b input_adapter
typename T
std::size_t N N
auto auto nlohmann::detail::input_adapter (T(&array)[N]) -> decltype(input_adapter(array, array+N)) input_adapter T(&) array [N] array input_adapter
bool static bool nlohmann::detail::little_endianess (int num=1) noexcept little_endianess int num 1

determine system byte order

true if and only if system's byte order is little endian

from https://stackoverflow.com/a/1001328/266378

typename FloatType
JSON_HEDLEY_RETURNS_NON_NULL char * JSON_HEDLEY_RETURNS_NON_NULL char* nlohmann::detail::to_chars (char *first, const char *last, FloatType value) to_chars char * first const char * last FloatType value

generates a decimal representation of the floating-point number value in [first, last).

The format of the resulting decimal representation is similar to printf's g format. Returns an iterator pointing past-the-end of the decimal representation.

The input number must be finite, i.e. NaN's and Inf's are not supported.

The buffer must be large enough.

The result is NOT null-terminated.

nlohmann::detail::dtoa_impl::format_buffer
nlohmann::detail::dtoa_impl::grisu2
JSON_ASSERT
value

detail namespace with internal helper functions

This namespace collects functions that should not be exposed, implementations of some basic_json methods, and meta-programming helpers.

version 2.1.0