Skip to content

Commit

Permalink
Added Gustavo S. Barreto to AUTHORS file. Explanation on how to use s…
Browse files Browse the repository at this point in the history
…erialization added to README file.
  • Loading branch information
Eeli Reilin committed Aug 14, 2011
2 parents a425d84 + 71772a6 commit 13dabee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
@@ -1 +1,2 @@
Eeli Reilin <eeli@emicode.fi>
Luis Gustavo S. Barreto <gustavosbarreto@gmail.com>
21 changes: 19 additions & 2 deletions README
Expand Up @@ -2,7 +2,8 @@
1. INTRODUCTION

The Json class is a simple class for parsing JSON data into a hierarchy
of QMaps, QLists, and QVariants.
of QMaps, QLists, and QVariants. Now, we can write JSON data from Qt
objects such as QString, QMap, QList and others.


########################################################################
Expand Down Expand Up @@ -70,8 +71,24 @@ length: 3
use_space: true
------------------------------------------------------------------------

Parsing JSON data with Json class is as simple as that! Enjoy!
To write JSON data from Qt object is as simple as parsing:

------------------------------------------------------------------------
QVariantMap map;
map["name"] = "Name";
map["age"] = 22;

QByteArray data = Json::serialize(map);
------------------------------------------------------------------------

The byte array 'data' contains valid JSON data:

------------------------------------------------------------------------
{
name: "Luis Gustavo",
age: 22,
}
------------------------------------------------------------------------

########################################################################
3. LICENSE
Expand Down

0 comments on commit 13dabee

Please sign in to comment.