Skip to content

Commit aa13a8b

Browse files
committed
comments/minor typos
1 parent da0fcfb commit aa13a8b

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

doc/jsoncpp.dox

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,24 @@ std::cin >> root;
5656
// You can also read into a particular sub-value.
5757
std::cin >> root["subtree"];
5858

59-
// Get the value of the member of root named 'encoding', return 'UTF-8' if there is no
60-
// such member.
59+
// Get the value of the member of root named 'encoding',
60+
// and return 'UTF-8' if there is no such member.
6161
std::string encoding = root.get("encoding", "UTF-8" ).asString();
62-
// Get the value of the member of root named 'encoding'; return a 'null' value if
62+
63+
// Get the value of the member of root named 'plug-ins'; return a 'null' value if
6364
// there is no such member.
6465
const Json::Value plugins = root["plug-ins"];
65-
for ( int index = 0; index < plugins.size(); ++index ) // Iterates over the sequence elements.
66+
67+
// Iterate over the sequence elements.
68+
for ( int index = 0; index < plugins.size(); ++index )
6669
loadPlugIn( plugins[index].asString() );
6770

71+
// Try other datatypes. Some are auto-convertible to others.
6872
foo::setIndentLength( root["indent"].get("length", 3).asInt() );
6973
foo::setIndentUseSpace( root["indent"].get("use_space", true).asBool() );
7074

71-
// Since Json::Value has implicit constructor for all value types, it is not
72-
// necessary to explicitly construct the Json::Value object:
75+
// Since Json::Value has an implicit constructor for all value types, it is not
76+
// necessary to explicitly construct the Json::Value object.
7377
root["encoding"] = foo::getCurrentEncoding();
7478
root["indent"]["length"] = foo::getCurrentIndentLength();
7579
root["indent"]["use_space"] = foo::getCurrentIndentUseSpace();

include/json/reader.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,21 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
298298
/** Configuration of this builder.
299299
These are case-sensitive.
300300
Available settings (case-sensitive):
301-
- "collectComments": false or true
301+
- `"collectComments": false or true`
302302
- true to collect comment and allow writing them
303303
back during serialization, false to discard comments.
304304
This parameter is ignored if allowComments is false.
305-
- "allowComments": false or true
305+
- `"allowComments": false or true`
306306
- true if comments are allowed.
307-
- "strictRoot": false or true
307+
- `"strictRoot": false or true`
308308
- true if root must be either an array or an object value
309-
- "allowDroppedNullPlaceholders": false or true
309+
- `"allowDroppedNullPlaceholders": false or true`
310310
- true if dropped null placeholders are allowed. (See StreamWriterBuilder.)
311-
- "allowNumericKeys": false or true
311+
- `"allowNumericKeys": false or true`
312312
- true if numeric object keys are allowed.
313-
- "stackLimit": integer
313+
- `"stackLimit": integer`
314+
- Exceeding stackLimit (recursive depth of `readValue()`) will
315+
cause an exception.
314316
- This is a security issue (seg-faults caused by deeply nested JSON),
315317
so the default is low.
316318

0 commit comments

Comments
 (0)