4
4
5
5
<a HREF="http://www.json.org/">JSON (JavaScript Object Notation)</a>
6
6
is a lightweight data-interchange format.
7
- It can represents integer, real number, string, an ordered sequence of value, and
7
+ It can represent integer, real number, string, an ordered sequence of value, and
8
8
a collection of name/value pairs.
9
9
10
10
Here is an example of JSON data:
@@ -28,8 +28,16 @@ Here is an example of JSON data:
28
28
29
29
\section _features Features
30
30
- read and write JSON document
31
+ - attach C and C++ style comments to element during parsing
31
32
- rewrite JSON document preserving original comments
32
33
34
+ Notes: Comments used to be supported in JSON but where removed for
35
+ portability (C like comments are not supported in Python). Since
36
+ comments are useful in configuration/input file, this feature was
37
+ preserved.
38
+
39
+ \section _example Code example
40
+
33
41
\code
34
42
Json::Value root; // will contains the root value after parsing.
35
43
Json::Reader reader;
@@ -57,7 +65,7 @@ setIndentUseSpace( root["indent"].get("use_space", true).asBool() );
57
65
// ...
58
66
// At application shutdown to make the new configuration document:
59
67
// Since Json::Value has implicit constructor for all value types, it is not
60
- // necessary to explicitely construct the Json::Value object:
68
+ // necessary to explicitly construct the Json::Value object:
61
69
root["encoding"] = getCurrentEncoding();
62
70
root["indent"]["length"] = getCurrentIndentLength();
63
71
root["indent"]["use_space"] = getCurrentIndentUseSpace();
@@ -75,11 +83,22 @@ std::cout << root;
75
83
\endcode
76
84
77
85
\section _plinks Build instructions
78
- The build instruction are located in the file
86
+ The build instructions are located in the file
79
87
<a HREF="README.txt">README.txt</a> in the top-directory of the project.
80
88
81
- Permanent link to the lastest revision of the file in subversion:
82
- <a HREF="http://svn.sourceforge.net/viewcvs.cgi/jsoncpp/README.txt?view=markup">lastest README.txt</a>
89
+ Permanent link to the latest revision of the file in subversion:
90
+ <a HREF="http://svn.sourceforge.net/viewcvs.cgi/jsoncpp/README.txt?view=markup">latest README.txt</a>
91
+
92
+ \section _pdownload Download
93
+ The sources can be downloaded from
94
+ <a HREF="http://sourceforge.net/projects/jsoncpp/files/">SourceForge download page</a>.
95
+
96
+ The latest version of the source is available in the project's subversion repository:
97
+ <a HREF="http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/">
98
+ http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/</a>
99
+
100
+ To checkout the source, see the following
101
+ <a HREF="http://sourceforge.net/scm/?type=svn&group_id=144446">instructions</a>.
83
102
84
103
\section _plinks Project links
85
104
- <a HREF="http://jsoncpp.sourceforge.net">json-cpp home</a>
0 commit comments