33#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
34#ifndef _QX_SERIALIZE_QJSON_QVARIANTHASH_H_
35#define _QX_SERIALIZE_QJSON_QVARIANTHASH_H_
48#include <QtCore/qjsonvalue.h>
49#include <QtCore/qjsonobject.h>
50#include <QtCore/qjsonarray.h>
51#include <QtCore/qvariant.h>
63 static inline QJsonValue
toJson(
const QVariantHash & t,
const QString & format)
64 { Q_UNUSED(format);
return QJsonValue(QJsonObject::fromVariantHash(t)); }
70 static inline qx_bool fromJson(
const QJsonValue & j, QVariantHash & t,
const QString & format)
71 { Q_UNUSED(format); t = j.toObject().toVariantHash();
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, QVariantHash &t, const QString &format)
static QJsonValue toJson(const QVariantHash &t, const QString &format)