News for hackers. Stuff that matters.
Re:Jo – a shell command to create JSON (2016) by killingtime74 on Saturday February 05, 2022 @06:04PM (#30227257)
what about how long for a human to read it and debug it when it gets beyond trivial?
Re:Jo – a shell command to create JSON (2016) by zimpenfish on Sunday February 06, 2022 @06:23AM (#30231509)
Fair question. I think jo does tend to get more crufty if you're doing anything reasonably complex with multilevel structures, especially with arrays.

But jo does come into its own when you're wanting to use shell variables.

    > jo mypid=$$ set_or_not=$WEASEL

    > python -c 'import json,os;print(json.dumps({"set_or_not":os.getenv("WEASEL"), "mypid":os.getpid()}))'