Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelJsonParser Class Reference

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

#include <StelJsonParser.hpp>

List of all members.

Public Member Functions

QVariant parse (QIODevice &input) const
void write (const QVariant &jsonObject, QIODevice &output, int indentLevel=0) const


Detailed Description

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

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

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

Member Function Documentation

QVariant StelJsonParser::parse ( QIODevice &  input  )  const

Parse the given input stream.

void StelJsonParser::write ( const QVariant &  jsonObject,
QIODevice &  output,
int  indentLevel = 0 
) const

Serialize the passed QVariant as JSON into the output QIODevice.


Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5