This is jo, a small utility to create JSON objects. Jo tries to be clever about types and knows null, booleans, strings and numbers. It does arrays, and it pretty-prints on demand. If a key’s value begins with an opening brace ({) or a bracket ([]) we attempt to decode JSON from it; this allows jo to add objects or arrays (use -a!) to itself. jo also supports nested types natively.
In the AUR as jo-git.
jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. This allows further command-line processing of output with tools like jq or jello by piping commands. The jc parsers can also be used as python modules.
PySnooper lets you do the same, except instead of carefully crafting the right print lines, you just add one decorator line to the function you're interested in. You'll get a play-by-play log of your function, including which lines ran and when, and exactly when local variables were changed.