| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 _FILE_PATH = os.path.dirname(os.path.realpath(__file__)) | 10 _FILE_PATH = os.path.dirname(os.path.realpath(__file__)) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 from simplejson import OrderedDict | 51 from simplejson import OrderedDict |
| 52 finally: | 52 finally: |
| 53 sys.path = _SYS_PATH | 53 sys.path = _SYS_PATH |
| 54 | 54 |
| 55 def Parse(json_str): | 55 def Parse(json_str): |
| 56 return simplejson.loads(json_comment_eater.Nom(json_str), | 56 return simplejson.loads(json_comment_eater.Nom(json_str), |
| 57 object_pairs_hook=OrderedDict) | 57 object_pairs_hook=OrderedDict) |
| 58 | 58 |
| 59 def IsDict(item): | 59 def IsDict(item): |
| 60 return isinstance(item, (dict, OrderedDict)) | 60 return isinstance(item, (dict, OrderedDict)) |
| OLD | NEW |