RflySimSDK v4.10
RflySimSDK说明文档
载入中...
搜索中...
未找到
adl_serializer< ValueType, typename > 模板结构体 参考

namespace for Niels Lohmann 更多...

#include <adl_serializer.hpp>

静态 Public 成员函数

template<typename BasicJsonType, typename TargetType = ValueType>
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
template<typename BasicJsonType, typename TargetType = ValueType>
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
template<typename BasicJsonType, typename TargetType = ValueType>
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

详细描述

template<typename ValueType, typename>
struct adl_serializer< ValueType, typename >

namespace for Niels Lohmann

参见
https://json.nlohmann.me/api/adl_serializer/
https://github.com/nlohmann
自从
version 1.0.0

default JSONSerializer template argument

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

成员函数说明

◆ from_json() [1/2]

template<typename ValueType, typename>
template<typename BasicJsonType, typename TargetType = ValueType>
auto from_json ( BasicJsonType && j) ->decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), detail::identity_tag< TargetType >{}))
inlinestaticnoexcept

convert a JSON value to any value type

参见
https://json.nlohmann.me/api/adl_serializer/from_json/

◆ from_json() [2/2]

template<typename ValueType, typename>
template<typename BasicJsonType, typename TargetType = ValueType>
auto from_json ( BasicJsonType && j,
TargetType & val )->decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), val), void())
inlinestaticnoexcept

convert a JSON value to any value type

参见
https://json.nlohmann.me/api/adl_serializer/from_json/

◆ to_json()

template<typename ValueType, typename>
template<typename BasicJsonType, typename TargetType = ValueType>
auto to_json ( BasicJsonType & j,
TargetType && val )->decltype(::nlohmann::to_json(j, std::forward< TargetType >(val)), void())
inlinestaticnoexcept

convert any value type to a JSON value

参见
https://json.nlohmann.me/api/adl_serializer/to_json/

该结构体的文档由以下文件生成: