summaryrefslogtreecommitdiff
path: root/prettyson
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-29 21:14:48 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-29 21:14:48 +0200
commit1eab650c0daf312782548f4332f2998da5f0a954 (patch)
tree00a117b8dd3d8d0becf5bc395aa856be85146d44 /prettyson
parent1bc5029024cadbbcd5d3f71c46bde391db454095 (diff)
downloadextrautils-1eab650c0daf312782548f4332f2998da5f0a954.tar.gz
Add prettyml, prettyson
Diffstat (limited to 'prettyson')
-rwxr-xr-xprettyson9
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)