nlohmann::adl_serializer
json.hpp
typename ValueType
typename
typename BasicJsonType
typename TargetType ValueType
auto static auto nlohmann::adl_serializer< ValueType, typename >::from_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()) from_json BasicJsonType && j TargetType & val

convert a JSON value to any value type

This function is usually called by the `get()` function of the basic_json class (either explicit or via conversion operators).

This function is chosen for default-constructible value types.

j

JSON value to read from

val

value to write to

nlohmann::detail::from_json
typename BasicJsonType
typename TargetType ValueType
auto static auto nlohmann::adl_serializer< ValueType, typename >::from_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 > from_json BasicJsonType && j

convert a JSON value to any value type

This function is usually called by the `get()` function of the basic_json class (either explicit or via conversion operators).

This function is chosen for value types which are not default-constructible.

j

JSON value to read from

copy of the JSON value, converted to ValueType

nlohmann::detail::from_json
typename BasicJsonType
typename TargetType ValueType
auto static auto nlohmann::adl_serializer< ValueType, typename >::to_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()) to_json BasicJsonType & j TargetType && val

convert any value type to a JSON value

This function is usually called by the constructors of the basic_json class.

j

JSON value to write to

val

value to read from

nlohmann::detail::to_json

default JSONSerializer template argument

This serializer ignores the template arguments and uses ADL (argument-dependent lookup) for serialization.

nlohmann::adl_serializer< ValueType, typename >
- nlohmann::adl_serializer
  from_json
- nlohmann::adl_serializer
  from_json
- nlohmann::adl_serializer
  to_json