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
Public Member Functions | Protected Attributes | List of all members
Zbl::ZblJsonHelper Class Reference

Converts objects between JSON and QJSValue domains for a specific QJSEngine instance. More...

#include <ZblJsonHelper.h>

Public Member Functions

 ZblJsonHelper (QJSEngine *engine)
 
QJSValue JsonTextToValue (QString jsonText)
 
QJSValue JsonValueToValue (QJsonValue &jsonVal)
 
QJSValue JsonArrayToValue (QJsonValue &jsonArrayValue)
 
QJSValue JsonArrayToValue (QJsonArray &array)
 
QJSValue JsonObjectToValue (QJsonValue &jsonObjectValue)
 
QJSValue JsonObjectToValue (QJsonObject &obj)
 
QString ValueToJson (QJSValue &value)
 

Protected Attributes

QJSEngine * m_engine
 

Detailed Description

Converts objects between JSON and QJSValue domains for a specific QJSEngine instance.

Definition at line 17 of file ZblJsonHelper.h.

Constructor & Destructor Documentation

◆ ZblJsonHelper()

Zbl::ZblJsonHelper::ZblJsonHelper ( QJSEngine *  engine)

Definition at line 12 of file ZblJsonHelper.cpp.

Member Function Documentation

◆ JsonArrayToValue() [1/2]

QJSValue Zbl::ZblJsonHelper::JsonArrayToValue ( QJsonValue &  jsonArrayValue)

Definition at line 40 of file ZblJsonHelper.cpp.

Referenced by JsonTextToValue(), and JsonValueToValue().

◆ JsonArrayToValue() [2/2]

QJSValue Zbl::ZblJsonHelper::JsonArrayToValue ( QJsonArray &  array)

Definition at line 46 of file ZblJsonHelper.cpp.

◆ JsonObjectToValue() [1/2]

QJSValue Zbl::ZblJsonHelper::JsonObjectToValue ( QJsonValue &  jsonObjectValue)

Definition at line 65 of file ZblJsonHelper.cpp.

Referenced by JsonTextToValue(), and JsonValueToValue().

◆ JsonObjectToValue() [2/2]

QJSValue Zbl::ZblJsonHelper::JsonObjectToValue ( QJsonObject &  obj)

Definition at line 71 of file ZblJsonHelper.cpp.

◆ JsonTextToValue()

QJSValue Zbl::ZblJsonHelper::JsonTextToValue ( QString  jsonText)

Definition at line 17 of file ZblJsonHelper.cpp.

Referenced by Zbl::ZScriptWorker::execScript().

◆ JsonValueToValue()

QJSValue Zbl::ZblJsonHelper::JsonValueToValue ( QJsonValue &  jsonVal)

Definition at line 91 of file ZblJsonHelper.cpp.

Referenced by JsonArrayToValue(), and JsonObjectToValue().

◆ ValueToJson()

QString Zbl::ZblJsonHelper::ValueToJson ( QJSValue &  value)

Definition at line 125 of file ZblJsonHelper.cpp.

Referenced by Zbl::ZScriptWorker::execScript().

Member Data Documentation

◆ m_engine

QJSEngine* Zbl::ZblJsonHelper::m_engine
protected

Definition at line 38 of file ZblJsonHelper.h.

Referenced by JsonArrayToValue(), and JsonObjectToValue().


The documentation for this class was generated from the following files: