Making flatbuffers JSON parsing deal with unexpected null values when unknown JSON is allowed. (#4083)

This commit is contained in:
garretmcgraw
2016-11-09 17:38:48 -05:00
committed by Wouter van Oortmerssen
parent d298adc4e6
commit c05803bf96

View File

@@ -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_)));
}