Cleanup some Json::Value methods:

* Rename isArray to isArrayOrNull
* Rename isObject to isObjectOrNull
* Introduce isArray and isObject
* Change as many uses of isArrayorNull to isArray as possible
* Change as many uses of isObjectorNull to isObject as possible
* Reject null JSON arrays for subscribe and unsubscribe
This commit is contained in:
Howard Hinnant
2018-02-01 15:23:41 -05:00
committed by Mike Ellery
parent 20defb4844
commit 1a245234f1
24 changed files with 90 additions and 63 deletions

View File

@@ -124,7 +124,7 @@ Reader::parse ( const char* beginDoc, const char* endDoc,
Token token;
skipCommentTokens ( token );
if ( !root.isArray () && !root.isObject () )
if ( !root.isNull() && !root.isArray() && !root.isObject() )
{
// Set error location to start of doc, ideally should be first token found in doc
token.type_ = tokenError;