Mercurial > hg > config
comparison python/jsonex.py @ 689:6f48a3e5ab41
STUB: python/jsonex.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 02 Jun 2014 11:25:31 -0700 |
parents | e50a95358db3 |
children | 80c47cc35f37 |
comparison
equal
deleted
inserted
replaced
688:ad8146c60c4d | 689:6f48a3e5ab41 |
---|---|
30 data = open(options.input, 'r') | 30 data = open(options.input, 'r') |
31 obj = json.load(data) | 31 obj = json.load(data) |
32 | 32 |
33 if options.object: | 33 if options.object: |
34 for o in options.object: | 34 for o in options.object: |
35 foo = arg.split('.') # split into objects | 35 base = obj |
36 # TODO: split into slice notation | 36 for part in o.strip().split('.'): # split into objects |
37 pass # TODO | 37 raise NotImplementedError('TODO') |
38 else: | 38 else: |
39 print json.dumps(obj, indent=2, sort_keys=True) | 39 print json.dumps(obj, indent=2, sort_keys=True) |
40 | 40 |
41 if __name__ == '__main__': | 41 if __name__ == '__main__': |
42 main() | 42 main() |