|
Cute Chess
0.1
|
A JSON (JavaScript Object Notation) serializer. More...
#include <jsonserializer.h>
Public Member Functions | |
| QString | errorString () const |
| bool | hasError () const |
| JsonSerializer (const QVariant &data) | |
| bool | serialize (QTextStream &stream) |
A JSON (JavaScript Object Notation) serializer.
JsonSerializer converts QVariants into JSON data and writes it to a text stream. The following QVariant types are supported:
JSON specification: http://json.org/
| JsonSerializer::JsonSerializer | ( | const QVariant & | data | ) |
Creates a new serializer that operates on data.
| QString JsonSerializer::errorString | ( | ) | const |
Returns a detailed description of the error.
| bool JsonSerializer::hasError | ( | ) | const |
Returns true if an error occured.
| bool JsonSerializer::serialize | ( | QTextStream & | stream | ) |
Converts the data into JSON format and writes it to stream.
Returns false if an invalid or unsupported variant type is encountered. Otherwise returns true.
1.8.11