File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,10 +299,17 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
299299 These are case-sensitive.
300300 Available settings (case-sensitive):
301301 - "collectComments": false or true
302- - "allowComments"
303- - "strictRoot"
304- - "allowDroppedNullPlaceholders"
305- - "allowNumericKeys"
302+ - true to collect comment and allow writing them
303+ back during serialization, false to discard comments.
304+ This parameter is ignored if allowComments is false.
305+ - "allowComments": false or true
306+ - true if comments are allowed.
307+ - "strictRoot": false or true
308+ - true if root must be either an array or an object value
309+ - "allowDroppedNullPlaceholders": false or true
310+ - true if dropped null placeholders are allowed. (See StreamWriterBuilder.)
311+ - "allowNumericKeys": false or true
312+ - true if numeric object keys are allowed.
306313
307314 You can examine 'settings_` yourself
308315 to see the defaults. You can also write and read them just like any
Original file line number Diff line number Diff line change @@ -92,9 +92,9 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
9292 Available settings (case-sensitive):
9393 - "commentStyle": "None" or "All"
9494 - "indentation": "<anything>"
95- - "enableYAMLCompatibility": False or True
95+ - "enableYAMLCompatibility": false or true
9696 - slightly change the whitespace around colons
97- - "dropNullPlaceholders": False or True
97+ - "dropNullPlaceholders": false or true
9898 - Drop the "null" string from the writer's output for nullValues.
9999 Strictly speaking, this is not valid JSON. But when the output is being
100100 fed to a browser's Javascript, it makes for smaller output and the
Original file line number Diff line number Diff line change @@ -981,7 +981,7 @@ StreamWriter* StreamWriterBuilder::newStreamWriter() const
981981 } else if (cs_str == " None" ) {
982982 cs = CommentStyle::None;
983983 } else {
984- return NULL ;
984+ throw std::runtime_error ( " commentStyle must be 'All' or 'None' " ) ;
985985 }
986986 std::string colonSymbol = " : " ;
987987 if (eyc) {
You can’t perform that action at this time.
0 commit comments