QtJson::Json Class Reference

A JSON data parser. More...

#include <json.h>

Static Public Member Functions

static QVariant parse (const QString &json)
 
static QVariant parse (const QString &json, bool &success)
 
static QByteArray serialize (const QVariant &data)
 
static QByteArray serialize (const QVariant &data, bool &success)
 

Detailed Description

A JSON data parser.

Json parses a JSON data into a QVariant hierarchy.

Definition at line 67 of file json.h.

Member Function Documentation

QVariant QtJson::Json::parse ( const QString &  json)
static

Parse a JSON string

Parameters
jsonThe JSON data

parse

Definition at line 69 of file json.cpp.

QVariant QtJson::Json::parse ( const QString &  json,
bool &  success 
)
static

Parse a JSON string

Parameters
jsonThe JSON data
successThe success of the parsing

parse

Definition at line 78 of file json.cpp.

QByteArray QtJson::Json::serialize ( const QVariant &  data)
static

This method generates a textual JSON representation

Parameters
dataThe JSON data generated by the parser.
successThe success of the serialization

Definition at line 102 of file json.cpp.

QByteArray QtJson::Json::serialize ( const QVariant &  data,
bool &  success 
)
static

This method generates a textual JSON representation

Parameters
dataThe JSON data generated by the parser.
successThe success of the serialization
Returns
QByteArray Textual JSON representation

Definition at line 108 of file json.cpp.


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