irccd  3.0.3
irccd::json_util::type_traits< T > Struct Template Reference

Describe how to convert a JSON value. More...

#include <json_util.hpp>

Detailed Description

template<typename T>
struct irccd::json_util::type_traits< T >

Describe how to convert a JSON value.

This traits must be specialized for every type you want to convert from JSON to its native type.

You only need to implement the get function with the following signature:

static std::optional<T> get(const nlohmann::json& value);

The implementation should not throw an exception but return a null optional instead.

This traits is already specialized for the given types:


The documentation for this struct was generated from the following file:
irccd::js::duk::get
auto get(duk_context *ctx, duk_idx_t index)
Definition: duk.hpp:293