WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
wpi::adl_serializer< typename, typename > Struct Template Reference

default JSONSerializer template argument More...

#include <json.h>

Static Public Member Functions

template<typename BasicJsonType , typename ValueType >
static void from_json (BasicJsonType &&j, ValueType &val) noexcept(noexcept(::wpi::from_json(std::forward< BasicJsonType >(j), val)))
 convert a JSON value to any value type More...
 
template<typename BasicJsonType , typename ValueType >
static void to_json (BasicJsonType &j, ValueType &&val) noexcept(noexcept(::wpi::to_json(j, std::forward< ValueType >(val))))
 convert any value type to a JSON value More...
 

Detailed Description

template<typename, typename>
struct wpi::adl_serializer< typename, typename >

default JSONSerializer template argument

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

Member Function Documentation

template<typename , typename >
template<typename BasicJsonType , typename ValueType >
static void wpi::adl_serializer< typename, typename >::from_json ( BasicJsonType &&  j,
ValueType &  val 
)
inlinestaticnoexcept

convert a JSON value to any value type

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

Parameters
[in]jJSON value to read from
[in,out]valvalue to write to
template<typename , typename >
template<typename BasicJsonType , typename ValueType >
static void wpi::adl_serializer< typename, typename >::to_json ( BasicJsonType &  j,
ValueType &&  val 
)
inlinestaticnoexcept

convert any value type to a JSON value

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

Parameters
[in,out]jJSON value to write to
[in]valvalue to read from

The documentation for this struct was generated from the following file: