# CocoaTweet: nlohmann::adl_serializer< typename, typename > Struct Template Reference

nlohmann::adl_serializer< typename, typename > Struct Template Reference

default JSONSerializer template argument More...

`#include <json.hpp>`

## Static Public Member Functions

template<typename BasicJsonType , typename ValueType >
static auto | from_json (BasicJsonType &&j, ValueType &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 More...
template<typename BasicJsonType , typename ValueType >
static auto | to_json (BasicJsonType &j, ValueType &&val) noexcept(noexcept(::nlohmann::to_json(j, std::forward< ValueType >(val)))) -> decltype(::nlohmann::to_json(j, std::forward< ValueType >(val)), void())
| convert any value type to a JSON value More...
template<typename BasicJsonType , typename ValueType >
static auto | from_json (BasicJsonType &&j, ValueType &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 More...
template<typename BasicJsonType , typename ValueType >
static auto | to_json (BasicJsonType &j, ValueType &&val) noexcept(noexcept(::nlohmann::to_json(j, std::forward< ValueType >(val)))) -> decltype(::nlohmann::to_json(j, std::forward< ValueType >(val)), void())
| convert any value type to a JSON value More...

## Detailed Description

### template<typename, typename>
struct nlohmann::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

## from_json() [1/2]

template<typename , typename >
template<typename BasicJsonType , typename ValueType >

static auto nlohmann::adl_serializer< typename, typename >::from_json | ( | BasicJsonType && | j,
|  | ValueType & | val
| ) |  | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())

inlinestaticnoexcept

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).

Parameters

  [in] | j | JSON value to read from
  [in,out] | val | value to write to

## from_json() [2/2]

template<typename , typename >
template<typename BasicJsonType , typename ValueType >

static auto nlohmann::adl_serializer< typename, typename >::from_json | ( | BasicJsonType && | j,
|  | ValueType & | val
| ) |  | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())

inlinestaticnoexcept

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).

Parameters

  [in] | j | JSON value to read from
  [in,out] | val | value to write to

## to_json() [1/2]

template<typename , typename >
template<typename BasicJsonType , typename ValueType >

static auto nlohmann::adl_serializer< typename, typename >::to_json | ( | BasicJsonType & | j,
|  | ValueType && | val
| ) |  | -> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)), void())

inlinestaticnoexcept

convert any value type to a JSON value

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

Parameters

  [in,out] | j | JSON value to write to
  [in] | val | value to read from

## to_json() [2/2]

template<typename , typename >
template<typename BasicJsonType , typename ValueType >

static auto nlohmann::adl_serializer< typename, typename >::to_json | ( | BasicJsonType & | j,
|  | ValueType && | val
| ) |  | -> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)), void())

inlinestaticnoexcept

convert any value type to a JSON value

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

Parameters

  [in,out] | j | JSON value to write to
  [in] | val | value to read from

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

- build/_deps/json-src/include/nlohmann/json.hpp