In this article I give a quick snapshot of what it’s like to work with JSON in various traditional and next generation shells. Traditional shells like Bash and Windows Command Prompt (cmd.exe) don’t have built-in JSON support and require 3rd party utilities. Newer shells like NGS, Nushell, Oil, Elvish, Murex, and PowerShell have JSON serialization/deserialization and filtering capabilities built-in for a cleaner experience.
There are lots of people interested in converting their git logs into beautiful JSON or JSON Lines for archive and analytics. It seems like it should be easy enough, but it is deceptively more complicated than it needs to be. When I got a feature request for jc to support git log output, my firstContinue reading “Easily Convert git log Output to JSON”
A new way to parse ASCII or Unicode plain text tables using jc and jq or jello. No need for grep, sed, or awk!
Best practices when adding a JSON output option to your command-line application.
Effectively use JSON data at the command line with jc, jello, and Bash. This article provides practical examples of how to improve your scripts with JSON.
Effectively use JSON data at the command line with jc, jq, and Bash. This article provides practical examples of how to improve your scripts with JSON.
Python has great exception-handling with nice traceback messages that can help debug issues with your code. Here’s an example of a typical traceback message: I usually read these from the bottom-up to zero-in on the issue. Here I can see that my program is trying to pop the last item off a list called parsed_line,Continue reading “More Comprehensive Tracebacks in Python”
jello works similarly to jq but uses the python interpreter, so you can iterate with loops, comprehensions, variables, expressions, etc. just like you would in a full-fledged python script.
jtbl is simple and elegant. It just takes in piped JSON or JSON Lines data and prints a table. There’s only one option to turn on column truncation vs. wrapping columns if the terminal width is too narrow to display the complete table. It ‘does the right thing’.
Fun at the command line plotting JSON values at the terminal with jc, jq, and jp.