diff --git a/include/json/features.h b/include/json/features.h index 1bb7bb614..781354783 100644 --- a/include/json/features.h +++ b/include/json/features.h @@ -44,12 +44,6 @@ class JSON_API Features { /// \c true if root must be either an array or an object value. Default: \c /// false. bool strictRoot_; - - /// \c true if dropped null placeholders are allowed. Default: \c false. - bool allowDroppedNullPlaceholders_; - - /// \c true if numeric object key are allowed. Default: \c false. - bool allowNumericKeys_; }; } // namespace Json diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 89052e69c..964e409dc 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -43,17 +43,14 @@ typedef std::auto_ptr CharReaderPtr; // //////////////////////////////// Features::Features() - : allowComments_(true), strictRoot_(false), - allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) {} - + : allowComments_(true), strictRoot_(false) +{} Features Features::all() { return Features(); } Features Features::strictMode() { Features features; features.allowComments_ = false; features.strictRoot_ = true; - features.allowDroppedNullPlaceholders_ = false; - features.allowNumericKeys_ = false; return features; } @@ -191,15 +188,6 @@ bool Reader::readValue() { currentValue().swapPayload(v); } break; - case tokenArraySeparator: - if (features_.allowDroppedNullPlaceholders_) { - // "Un-read" the current token and mark the current value as a null - // token. - current_--; - Value v; - currentValue().swapPayload(v); - break; - } // Else, fall through... default: return addError("Syntax error: value, object or array expected.", token); @@ -446,11 +434,6 @@ bool Reader::readObject(Token& /*tokenStart*/) { if (tokenName.type_ == tokenString) { if (!decodeString(tokenName, name)) return recoverFromError(tokenObjectEnd); - } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { - Value numberName; - if (!decodeNumber(tokenName, numberName)) - return recoverFromError(tokenObjectEnd); - name = numberName.asString(); } else { break; }