Skip to content

Commit 948f290

Browse files
committed
update docs
1 parent 964affd commit 948f290

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

doc/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</a>
1717
</td>
1818
<td width="40%" align="right" valign="center">
19-
<a href="https://github.com/open-source-parsers/jsoncpp">JsonCpp home page</a>
19+
<a href="http://open-source-parsers.github.io/jsoncpp-docs/doxygen/">JsonCpp home page</a>
2020
</td>
2121
</tr>
2222
</table>

doc/jsoncpp.dox

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@
44

55
<a HREF="http://www.json.org/">JSON (JavaScript Object Notation)</a>
66
is a lightweight data-interchange format.
7-
It can represent integer, real number, string, an ordered sequence of value, and
8-
a collection of name/value pairs.
97

108
Here is an example of JSON data:
119
\verbatim
10+
{
11+
"encoding" : "UTF-8",
12+
"plug-ins" : [
13+
"python",
14+
"c++",
15+
"ruby"
16+
],
17+
"indent" : { "length" : 3, "use_space": true }
18+
}
19+
\endverbatim
20+
<b>JsonCpp</b> supports comments as <i>meta-data</i>:
21+
\code
1222
// Configuration options
1323
{
1424
// Default encoding for text
@@ -17,30 +27,30 @@ Here is an example of JSON data:
1727
// Plug-ins loaded at start-up
1828
"plug-ins" : [
1929
"python",
20-
"c++",
30+
"c++", // trailing comment
2131
"ruby"
2232
],
2333

2434
// Tab indent size
25-
"indent" : { "length" : 3, "use_space": true }
35+
// (multi-line comment)
36+
"indent" : { /*embedded comment*/ "length" : 3, "use_space": true }
2637
}
27-
\endverbatim
28-
<code>jsoncpp</code> supports comments as <i>meta-data</i>.
38+
\endcode
2939

3040
\section _features Features
3141
- read and write JSON document
3242
- attach C++ style comments to element during parsing
3343
- rewrite JSON document preserving original comments
3444

35-
Notes: Comments used to be supported in JSON but where removed for
45+
Notes: Comments used to be supported in JSON but were removed for
3646
portability (C like comments are not supported in Python). Since
3747
comments are useful in configuration/input file, this feature was
3848
preserved.
3949

4050
\section _example Code example
4151

4252
\code
43-
Json::Value root; // will contains the root value after parsing.
53+
Json::Value root; // will contain the root value after parsing.
4454
Json::Reader reader;
4555
bool parsingSuccessful = reader.parse( config_doc, root );
4656
if ( !parsingSuccessful )

0 commit comments

Comments
 (0)