JPARSE - An initial example

As with most APIs, an easy example does more for understanding how it works than a hundred pages describing it. so we will begin showing the example that comes with the library and that is called jparse.

jparse receives a list of files from the command line assuming that each argument is a file containing a full json formatted structure. It then opens and reads each of these files, stopping when an error is detected and writing parsed data again on standard output.

Because of this, jparse can be used as an example about how to read JSON data, how to write data in JSON format and it can also perform as a unit test where to check if a file is well formatted and how will the library work on a specific file.


(c) 2007 Kombo Morongo.

Unless otherwise stated for scpecific contents of this site, permission is granted to copy, distribute and/or modify the contents of this site under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation. A copy of the license is included in the section entitled "GNU Free Documentation License".

Powered by Drupal - Modified by Danger4k