Tighten up some serialization checks

This commit is contained in:
David Schwartz
2014-06-20 09:53:19 -07:00
parent e70d618aff
commit d06092212f
7 changed files with 58 additions and 7 deletions

View File

@@ -705,7 +705,7 @@ bool STParsedJSON::parse (std::string const& json_name,
"[" << i << "]." << objectName;
bool const success (parse (ss.str (), objectFields,
nameField, depth + 1, sub_object_));
if (! success)
if (! success || (sub_object_->getFName().fieldType != STI_OBJECT))
return false;
}
tail->push_back (*sub_object_);