A class representing a JSON object.
More...
#include <json.h>
|
|
| JSON () |
| | Constructs an empty JSON object.
|
| | JSON (const QJsonObject &other) |
| | Constructs a JSON object from another QJsonObject.
|
| QString | print () const |
| | Converts the JSON object to a string representation.
|
|
| static Result< JSON > | fromFile (const char *filename) |
| | Creates a JSON object from a file.
|
| static Result< JSON > | fromFile (const QString &filename) |
| | Creates a JSON object from a file.
|
| static QString | fromArray (const QVariantList &value, char separator) |
| | Creates a JSON array from a QVariantList.
|
| static QJsonArray | toArray (const QJsonValue &value, char separator) |
| | Creates a JSON array from a QVariantList.
|
| static QJsonObject | fromPointF (const QPointF &value) |
| | Creates a JSON object from a QPointF.
|
| static QPointF | toPointF (const QJsonObject &value) |
| | Converts a QJsonObject to a QPointF.
|
| static QJsonObject | fromSizeF (const QSizeF &value) |
| | Creates a JSON object from a QSizeF.
|
| static QSizeF | toSizeF (const QJsonObject &value) |
| | Converts a QJsonObject to a QSizeF.
|
| static QJsonObject | fromPixmap (const QPixmap &value) |
| | Creates a JSON object from a QPixmap.
|
| static QPixmap | toPixmap (const QJsonObject &value) |
| | Converts a QJsonObject to a QPixmap.
|
A class representing a JSON object.
◆ JSON()
| JSON::JSON |
( |
const QJsonObject & | other | ) |
|
Constructs a JSON object from another QJsonObject.
- Parameters
-
| other | The QJsonObject to copy. |
◆ fromArray()
| QString JSON::fromArray |
( |
const QVariantList & | value, |
|
|
char | separator ) |
|
static |
Creates a JSON array from a QVariantList.
- Parameters
-
| value | The QVariantList to convert. |
| separator | The separator character. |
- Returns
- QString The resulting string.
◆ fromFile() [1/2]
| Result< JSON > JSON::fromFile |
( |
const char * | filename | ) |
|
|
static |
Creates a JSON object from a file.
- Parameters
-
| filename | The path to the file. |
- Returns
- Result<JSON> A result containing the JSON object or an error.
◆ fromFile() [2/2]
| Result< JSON > JSON::fromFile |
( |
const QString & | filename | ) |
|
|
static |
Creates a JSON object from a file.
- Parameters
-
| filename | The path to the file. |
- Returns
- Result<JSON> A result containing the JSON object or an error.
◆ fromPixmap()
| QJsonObject JSON::fromPixmap |
( |
const QPixmap & | value | ) |
|
|
static |
Creates a JSON object from a QPixmap.
- Parameters
-
| value | The QPixmap to convert. |
- Returns
- QJsonObject The resulting QJsonObject.
◆ fromPointF()
| QJsonObject JSON::fromPointF |
( |
const QPointF & | value | ) |
|
|
static |
Creates a JSON object from a QPointF.
- Parameters
-
| value | The QPointF to convert. |
- Returns
- QJsonObject The resulting QJsonObject.
◆ fromSizeF()
| QJsonObject JSON::fromSizeF |
( |
const QSizeF & | value | ) |
|
|
static |
Creates a JSON object from a QSizeF.
- Parameters
-
| value | The QSizeF to convert. |
- Returns
- QJsonObject The resulting QJsonObject.
◆ print()
| QString JSON::print |
( |
| ) |
const |
Converts the JSON object to a string representation.
- Returns
- QString The string representation of the JSON object.
◆ toArray()
| QJsonArray JSON::toArray |
( |
const QJsonValue & | value, |
|
|
char | separator ) |
|
static |
Creates a JSON array from a QVariantList.
- Parameters
-
| value | The QVariantList to convert. |
| separator | The separator character. |
- Returns
- QJsonArray The resulting QJsonArray.
◆ toPixmap()
| QPixmap JSON::toPixmap |
( |
const QJsonObject & | value | ) |
|
|
static |
Converts a QJsonObject to a QPixmap.
- Parameters
-
| value | The QJsonObject to convert. |
- Returns
- QPixmap The resulting QPixmap.
◆ toPointF()
| QPointF JSON::toPointF |
( |
const QJsonObject & | value | ) |
|
|
static |
Converts a QJsonObject to a QPointF.
- Parameters
-
| value | The QJsonObject to convert. |
- Returns
- QPointF The resulting QPointF.
◆ toSizeF()
| QSizeF JSON::toSizeF |
( |
const QJsonObject & | value | ) |
|
|
static |
Converts a QJsonObject to a QSizeF.
- Parameters
-
| value | The QJsonObject to convert. |
- Returns
- QSizeF The resulting QSizeF.
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/common/json.h
- /__w/maki/maki/app/common/json.cpp