Cute Chess  0.1
Public Member Functions | List of all members
JsonParser Class Reference

A JSON (JavaScript Object Notation) parser. More...

#include <jsonparser.h>

Public Member Functions

qint64 errorLineNumber () const
 
QString errorString () const
 
bool hasError () const
 
 JsonParser (QTextStream &stream)
 
QVariant parse ()
 

Detailed Description

A JSON (JavaScript Object Notation) parser.

JsonParser parses JSON data from a text stream and converts it into a QVariant.

JSON specification: http://json.org/

See also
JsonSerializer

Constructor & Destructor Documentation

JsonParser::JsonParser ( QTextStream stream)

Creates a new parser that reads data from stream.

Member Function Documentation

qint64 JsonParser::errorLineNumber ( ) const

Returns the line number on which the error occured.

QString JsonParser::errorString ( ) const

Returns a detailed description of the error.

bool JsonParser::hasError ( ) const

Returns true if a parsing error occured.

QVariant JsonParser::parse ( )

Parses JSON data from the stream.

Returns a null QVariant object if a parsing error occurs. Use hasError() to check for errors.


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