-
-
Save ivanromanko/d56d30f4fd4f01e3d509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import fileinput | |
import json | |
from pprint import pprint | |
for line in fileinput.input(): | |
if not line.startswith(("{", "[")): | |
print(line.strip()) | |
else: | |
#pprint(json.loads(line)) | |
print(json.dumps(json.loads(line), indent=4, separators=(',', ': '))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment