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