summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgarretmcgraw <garret.mcgraw@videon-central.com>2016-11-09 17:38:48 -0500
committerWouter van Oortmerssen <wvo@google.com>2016-11-09 14:38:48 -0800
commitc05803bf9683f3e8dff76bf85d6030ec00823564 (patch)
treeee12bca637ebcfdf6123349aeebfe44bdf5c6408
parentd298adc4e6f840191d556dddccaa76868bbca3c3 (diff)
downloadflatbuffers-c05803bf9683f3e8dff76bf85d6030ec00823564.tar.gz
flatbuffers-c05803bf9683f3e8dff76bf85d6030ec00823564.tar.bz2
flatbuffers-c05803bf9683f3e8dff76bf85d6030ec00823564.zip
Making flatbuffers JSON parsing deal with unexpected null values when unknown JSON is allowed. (#4083)
-rw-r--r--src/idl_parser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp
index f69ae4c0..0dc73924 100644
--- a/src/idl_parser.cpp
+++ b/src/idl_parser.cpp
@@ -1758,6 +1758,9 @@ CheckedError Parser::SkipAnyJsonValue() {
case kTokenFloatConstant:
EXPECT(kTokenFloatConstant);
break;
+ case kTokenNull:
+ EXPECT(kTokenNull);
+ break;
default:
return Error(std::string("Unexpected token:") + std::string(1, static_cast<char>(token_)));
}