blob: 0a327adddc126c22179e74f47266b3c0188f9d21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/python
import sys, json
def inputs(args):
if args:
for filename in args:
with open(filename) as f:
yield filename, f
else:
yield '-', sys.stdin
objs = []
for filename, f in inputs(sys.argv[1:]):
objs.append(json.load(f))
json.dump(objs, sys.stdout, indent=4)
sys.stdout.write('\n')
|