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

Unified Diff: tools/json_schema_compiler/model.py

Issue 10198005: Implement handling of binary data in JSON schema compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 months 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
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/model.py
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index 6dc20fe3ced9b70e6ad0f4c264517e3f0d270280..75ae60e439f3676a8ed895fa110e23a610a5f55d 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -218,6 +218,8 @@ class Property(object):
# self.properties will already have some value from |_AddProperties|.
self.properties.update(type_.properties)
self.functions = type_.functions
+ elif json_type == 'binary':
+ self.type_ = PropertyType.BINARY
else:
raise ParseException(self, 'type ' + json_type + ' not recognized')
elif 'choices' in json:
@@ -299,6 +301,7 @@ class PropertyType(object):
REF = _Info(False, "REF")
CHOICES = _Info(False, "CHOICES")
OBJECT = _Info(False, "OBJECT")
+ BINARY = _Info(False, "BINARY")
ANY = _Info(False, "ANY")
ADDITIONAL_PROPERTIES = _Info(False, "ADDITIONAL_PROPERTIES")
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698