WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZblJsonHelper.h
Go to the documentation of this file.
1 #ifndef ZBLJSONHELPER_H
2 #define ZBLJSONHELPER_H
3 
4 #include <QString>
5 #include <QJSValue>
6 
7 class QJSEngine;
8 
9 namespace Zbl
10 {
11 
18 {
19 public:
20  ZblJsonHelper(QJSEngine* engine);
21 
22  QJSValue JsonTextToValue(QString jsonText);
23 
24  QJSValue JsonValueToValue(QJsonValue& jsonVal);
25 
26  QJSValue JsonArrayToValue(QJsonValue& jsonArrayValue);
27 
28  QJSValue JsonArrayToValue(QJsonArray &array);
29 
30  QJSValue JsonObjectToValue(QJsonValue &jsonObjectValue);
31 
32  QJSValue JsonObjectToValue(QJsonObject &obj);
33 
34  QString ValueToJson(QJSValue &value);
35 
36 protected:
37 
38  QJSEngine* m_engine;
39 
40 };
41 
42 
43 
44 } // Zbl
45 
46 #endif // ZBLJSONHELPER_H
QString ValueToJson(QJSValue &value)
QJSValue JsonArrayToValue(QJsonValue &jsonArrayValue)
QJSValue JsonObjectToValue(QJsonValue &jsonObjectValue)
ZblJsonHelper(QJSEngine *engine)
Definition: ZAndGate.cpp:6
QJSValue JsonTextToValue(QString jsonText)
Converts objects between JSON and QJSValue domains for a specific QJSEngine instance.
Definition: ZblJsonHelper.h:17
QJSValue JsonValueToValue(QJsonValue &jsonVal)
QJSEngine * m_engine
Definition: ZblJsonHelper.h:38