Qx v0.7
Qt Extensions Library
Loading...
Searching...
No Matches
QxJson::json_override_convertible Concept Reference

Specifies that a type has override conversions for changing to/from JSON. More...

Concept definition

template<class K, typename T, Qx::CStringLiteral N>
concept QxJson::json_override_convertible = requires(T& tValue) {
{ MemberOverrideCoverter<K, N>::fromJson(tValue, QJsonValue()) } -> std::same_as<Qx::JsonError>;
{ MemberOverrideCoverter<K, N>::toJson(tValue) } -> qjson_type;
}
Specifies that a type has override conversions for changing to/from JSON.
Definition qx-json.h:265

Detailed Description

Satisfied if QX_JSON_MEMBER_OVERRIDE() has been used to add functions to a JSON-tied struct with the signatures:

  • static Qx::JsonError fromJson(T& member, const QJsonValue& jValue)
  • static R toJson(const T& member)

where R is any type that satisfies the qjson_type concept.