diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-02-29 21:14:48 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-02-29 21:14:48 +0200 |
commit | 1eab650c0daf312782548f4332f2998da5f0a954 (patch) | |
tree | 00a117b8dd3d8d0becf5bc395aa856be85146d44 /prettyson | |
parent | 1bc5029024cadbbcd5d3f71c46bde391db454095 (diff) | |
download | extrautils-1eab650c0daf312782548f4332f2998da5f0a954.tar.gz |
Add prettyml, prettyson
Diffstat (limited to 'prettyson')
-rwxr-xr-x | prettyson | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/prettyson b/prettyson new file mode 100755 index 0000000..367cff8 --- /dev/null +++ b/prettyson @@ -0,0 +1,9 @@ +#!/usr/bin/python + +import sys, json + +objs = [] +for filename in sys.argv[1:]: + with open(filename) as f: + objs.append(json.load(f)) +json.dump(objs, sys.stdout, indent=4) |