AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AJsonConv< T, Specialization > Struct Template Reference

Detailed Description#

template<typename T, typename Specialization = void>
struct AJsonConv< T, Specialization >

Json conversion trait.

In order to convert use aui::to_json/aui::from_json functions instead.

static AJson to_json(const T&) converts the type to AJson

static T from_json(const AJson&) converts AJson to the type

template<>
struct AJsonConv<YOURTYPE> {
 static AJson toJson(const YOURTYPE& t) {}
 static void fromJson(const AJson& json, YOURTYPE& dst) {}
};

Template Parameters
Tthe type converted.
Specializationused only to define specializations with std::enable_if_t.
Examples
/home/runner/work/aui/aui/aui.json/src/AUI/Json/Conversion.h.