Index: tools/json_schema_compiler/json_schema.py |
diff --git a/tools/json_schema_compiler/json_schema.py b/tools/json_schema_compiler/json_schema.py |
index 0fa1ba57e9669379d75f1909215dc751816fe54d..ae126c2de911251418b608558d6c5b027e81b42b 100644 |
--- a/tools/json_schema_compiler/json_schema.py |
+++ b/tools/json_schema_compiler/json_schema.py |
@@ -3,11 +3,8 @@ |
# found in the LICENSE file. |
import copy |
-import os |
-import sys |
import json_parse |
-import schema_util |
def DeleteNodes(item, delete_key): |
"""Deletes the given nodes in item, recursively, that have |delete_key| as |
@@ -31,15 +28,18 @@ def DeleteNodes(item, delete_key): |
return item |
+ |
def Load(filename): |
with open(filename, 'r') as handle: |
schemas = json_parse.Parse(handle.read()) |
return schemas |
+ |
# A dictionary mapping |filename| to the object resulting from loading the JSON |
# at |filename|. |
_cache = {} |
+ |
def CachedLoad(filename): |
"""Equivalent to Load(filename), but caches results for subsequent calls""" |
if filename not in _cache: |