Source code
QJson code is hosted on gitorious. You can download latest version using the following command:
git clone git://gitorious.org/qjson/qjson.git
Howto contribute
You can send your contribute in different ways:
- forking qjson on gitorious and then making a pull request.
- sending your patches to the qjson developers mailing list or to me.
Before submitting your contribution please ensure:
- The code compiles.
- The patch/single commits are fixing a specific issue or implementing a new feature (they are not doing multiple things at the same time).
- If you have patched the bison parser please don't include changes made to json_parser.{cc,hh} into the diff file.
- QJson unit tests have been updated.
- QJson unit tests are passing.
Unit testing
QJson unit tests are located under the tests directory. You can enable them passing the following option to cmake:
-DKDE4_BUILD_TESTS=TRUE
In order to run them just type:
make tests
If you want to run the parser unit tests just type:
./testparser
If you want to run the serializer unit tests just type:
./testserializer
If you want to test the QJson parser against a specific JSON object you can use the cmdline_tester program.
This binary is located under the tests directory and has a straightforward syntax:
./cmdline_tester text_file_containing_json_object
The command will convert the JSON object to a QVariant and dump it to stdout.
Note well: cmdline_tester relies on qDebug() for dumping the object. qDebug has some limitations, like being unable to print utf8 chars.