Skip to content

Instantly share code, notes, and snippets.

@kdheepak
Created October 8, 2016 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdheepak/5e4d608f9688f40fb0be8b0b839b2c11 to your computer and use it in GitHub Desktop.
Save kdheepak/5e4d608f9688f40fb0be8b0b839b2c11 to your computer and use it in GitHub Desktop.
pretty print pandoc json output
#! /usr/bin/env python
import sys
import json
def main(arg):
print(json.dumps(json.loads(arg), indent=2))
if __name__ == '__main__':
main('\n'.join([line for line in sys.stdin]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment