Created
March 3, 2022 19:50
-
-
Save hgfernan/716f599503c21d56ca141da04349ffa1 to your computer and use it in GitHub Desktop.
Complementing a benchmark to evaluate JSON pretty printers.
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
export TEXT='{ "foo" : { "bar": { "dolorem" : "ipsum", "quia" : { "dolor" : "sit"} } } }' | |
function bench { | |
time ( | |
for i in {1..100}; do | |
echo "${TEXT}" | $@ > /dev/null | |
done | |
) | |
} | |
bench python -m json.tool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment