Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Static Public Member Functions

StelJsonParser Class Reference

Qt-based simple JSON reader inspired by the one from Zoolib. More...

#include <StelJsonParser.hpp>

List of all members.

Static Public Member Functions

static JsonListIterator initListIterator (QIODevice *in)
static QVariant parse (QIODevice *input)
static QVariant parse (const QByteArray &input)
static void write (const QVariant &jsonObject, QIODevice *output, int indentLevel=0)
static QByteArray write (const QVariant &jsonObject, int indentLevel=0)
static void registerSerializerForType (int t, void(*func)(const QVariant &, QIODevice *, int))

Detailed Description

Qt-based simple JSON reader inspired by the one from Zoolib.

The mapping with Qt types is done as following:

JSON            Qt
----          -------
null          QVariant::Invalid
object        QVariantMap (QVariant::Map)
array         QVariantList (QVariant::List)
boolean       QVariant::Bool
string        QVariant::String
number        QVariant::Int or QVariant::Double

JSON is JavaScript Object Notation. See http://www.json.org/