33#ifndef _QX_SERIALIZE_QJSON_QVARIANTMAP_H_
34#define _QX_SERIALIZE_QJSON_QVARIANTMAP_H_
47#include <QtCore/qjsonvalue.h>
48#include <QtCore/qjsonobject.h>
49#include <QtCore/qjsonarray.h>
50#include <QtCore/qvariant.h>
62 static inline QJsonValue
toJson(
const QVariantMap & t,
const QString & format)
63 { Q_UNUSED(format);
return QJsonValue(QJsonObject::fromVariantMap(t)); }
69 static inline qx_bool fromJson(
const QJsonValue & j, QVariantMap & t,
const QString & format)
70 { Q_UNUSED(format); t = j.toObject().toVariantMap();
return qx_bool(
true); }
qx::cvt : namespace to provide global functions to convert any kind of objects to/from QString and QV...
qx_bool : boolean type with code and description message when an error occured
Root namespace for all QxOrm library features.
static qx_bool fromJson(const QJsonValue &j, QVariantMap &t, const QString &format)
static QJsonValue toJson(const QVariantMap &t, const QString &format)