Created
October 1, 2020 06:32
-
-
Save sytranvn/44e43288c7268d96742e901a9606ed3f to your computer and use it in GitHub Desktop.
Minify json to 1 line
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 bash | |
# by Jamie Tanna | |
python -c $'import json\nimport sys\nwith open(sys.argv[1], "r") as f: print(json.dumps(json.load(f)))' $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment