Skip to content

Instantly share code, notes, and snippets.

@RussellLuo
Last active May 12, 2017 06:27
Show Gist options
  • Select an option

  • Save RussellLuo/23b5116ed3593bfdb36265df4930ab2b to your computer and use it in GitHub Desktop.

Select an option

Save RussellLuo/23b5116ed3593bfdb36265df4930ab2b to your computer and use it in GitHub Desktop.
JSON pretty printer in one line.
echo '{"hello":"你好"}' | python -c 'import json, sys; print(json.dumps(json.loads(sys.stdin.read()), ensure_ascii=False, indent=2))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment