@@ -43,17 +43,14 @@ typedef std::auto_ptr<CharReader> CharReaderPtr;
43
43
// ////////////////////////////////
44
44
45
45
Features::Features ()
46
- : allowComments_(true ), strictRoot_(false ),
47
- allowDroppedNullPlaceholders_ (false ), allowNumericKeys_(false ) {}
48
-
46
+ : allowComments_(true ), strictRoot_(false )
47
+ {}
49
48
Features Features::all () { return Features (); }
50
49
51
50
Features Features::strictMode () {
52
51
Features features;
53
52
features.allowComments_ = false ;
54
53
features.strictRoot_ = true ;
55
- features.allowDroppedNullPlaceholders_ = false ;
56
- features.allowNumericKeys_ = false ;
57
54
return features;
58
55
}
59
56
@@ -191,17 +188,7 @@ bool Reader::readValue() {
191
188
currentValue ().swapPayload (v);
192
189
}
193
190
break ;
194
- case tokenArraySeparator:
195
- case tokenObjectEnd:
196
- case tokenArrayEnd:
197
- if (features_.allowDroppedNullPlaceholders_ ) {
198
- // "Un-read" the current token and mark the current value as a null
199
- // token.
200
- current_--;
201
- Value v;
202
- currentValue ().swapPayload (v);
203
- break ;
204
- } // Else, fall through...
191
+ // Else, fall through...
205
192
default :
206
193
return addError (" Syntax error: value, object or array expected." , token);
207
194
}
@@ -447,11 +434,6 @@ bool Reader::readObject(Token& /*tokenStart*/) {
447
434
if (tokenName.type_ == tokenString) {
448
435
if (!decodeString (tokenName, name))
449
436
return recoverFromError (tokenObjectEnd);
450
- } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_ ) {
451
- Value numberName;
452
- if (!decodeNumber (tokenName, numberName))
453
- return recoverFromError (tokenObjectEnd);
454
- name = numberName.asString ();
455
437
} else {
456
438
break ;
457
439
}
0 commit comments