Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: components/json_schema/json_schema_validator.h

Issue 94043003: Ignore unknown attributes when parsing JSON schemas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added flag Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/json_schema/json_schema_validator.h
diff --git a/components/json_schema/json_schema_validator.h b/components/json_schema/json_schema_validator.h
index 4584a9da77a5be1bf1b17d5babebc46133b3b913..2fb9d3118a43952a6293f34b6511bb79eabb342a 100644
--- a/components/json_schema/json_schema_validator.h
+++ b/components/json_schema/json_schema_validator.h
@@ -104,8 +104,11 @@ class JSONSchemaValidator {
// and that DictionaryValue can be used to build a JSONSchemaValidator.
// Returns the parsed DictionaryValue when |schema| validated, otherwise
// returns NULL. In that case, |error| contains an error description.
+ // If |ignore_unknown_attributes| is true then unrecognized entries in the
+ // schema will be ignored; otherwise, they'll cause a fatal parsing error.
static scoped_ptr<base::DictionaryValue> IsValidSchema(
const std::string& schema,
+ bool ignore_unknown_attributes,
not at google - send to devlin 2013/12/06 18:12:26 pls make this an enum like the JSONWriter has (Opt
Joao da Silva 2013/12/08 08:41:20 Done.
std::string* error);
// Creates a validator for the specified schema.
« no previous file with comments | « no previous file | components/json_schema/json_schema_validator.cc » ('j') | components/json_schema/json_schema_validator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698