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

Side by Side Diff: tools/json_schema_compiler/json_schema.py

Issue 9447090: Allow comments in extension config files. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed up license headers to pass license tests Created 8 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import json
6 import os.path
7 import sys
8
9 # We need to get json_minify from the third_party directory.
10 # This is similar to what is done in chrome/common/extensions/docs/build.py
11 third_party_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
12 os.pardir, os.pardir, 'third_party/')
13 if third_party_path not in sys.path:
14 sys.path.insert(0, third_party_path)
15 import json_minify as minify
16
17 def LoadJSON(filename):
18 with open(filename, 'r') as handle:
19 return json.loads(minify.json_minify(handle.read()))
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/cpp_type_generator_test.py ('k') | tools/json_schema_compiler/model_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698