6 #include <nlohmann/detail/conversions/from_json.hpp>
7 #include <nlohmann/detail/conversions/to_json.hpp>
8 #include <nlohmann/detail/meta/identity_tag.hpp>
9 #include <nlohmann/detail/meta/type_traits.hpp>
14 template<
typename ValueType,
typename>
28 template<
typename BasicJsonType,
typename TargetType = ValueType>
29 static auto from_json(BasicJsonType && j, TargetType& val) noexcept(
30 noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))
31 -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val),
void())
33 ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
48 template<
typename BasicJsonType,
typename TargetType = ValueType>
53 return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {});
65 template<
typename BasicJsonType,
typename TargetType = ValueType>
66 static auto to_json(BasicJsonType& j, TargetType && val) noexcept(
67 noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val))))
68 -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)),
void())
70 ::nlohmann::to_json(j, std::forward<TargetType>(val));
namespace for Niels Lohmann
Definition: adl_serializer.hpp:12
default JSONSerializer template argument
Definition: adl_serializer.hpp:16
static auto 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())
convert a JSON value to any value type
Definition: adl_serializer.hpp:29
static auto 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 > {}))
convert a JSON value to any value type
Definition: adl_serializer.hpp:49
static auto 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())
convert any value type to a JSON value
Definition: adl_serializer.hpp:66
Definition: identity_tag.hpp:8