libQuotient
A Qt library for building matrix clients
|
The switchboard for extra conversion algorithms behind from/toJson. More...
#include <converters.h>
Static Public Member Functions | |
static auto | dump (const T &data) |
static T | load (const QJsonObject &jo) |
Static Public Member Functions inherited from Quotient::JsonObjectUnpacker< T > | |
static T | load (const QJsonValue &jv) |
static T | load (const QJsonDocument &jd) |
The switchboard for extra conversion algorithms behind from/toJson.
This template is mainly intended for partial conversion specialisations since from/toJson are functions and cannot be partially specialised. Another case for JsonConverter is to insulate types that can be constructed from basic types - namely, QVariant and QUrl can be directly constructed from QString and having an overload or specialisation for those leads to ambiguity between these and QJsonValue. For trivial (converting QJsonObject/QJsonValue) and most simple cases such as primitive types or QString this class is not needed.
Do NOT call the functions of this class directly unless you know what you're doing; and do not try to specialise basic things unless you're really sure that they are not supported and it's not feasible to support those by means of overloading toJson() and specialising fromJson().
Definition at line 78 of file converters.h.
|
inlinestatic |
Definition at line 79 of file converters.h.
|
inlinestatic |
Definition at line 91 of file converters.h.