masto.ai is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general Mastodon server for all languages.

Administered by:

Server stats:

2.2K
active users

I find JSON has a great balance between programmatic handling and human readability. But this leads to it being bit verbose.

I wrote about three tools in my toolbox for handling JSON on command line: jq, jless and fx.

Do you use something different? Share tips in replies!

hamatti.org/posts/handling-jso

Juha-Matti Santala - Community Builder. Dreamer. Adventurer. · Handling JSON on command lineJSON is a good format for programmatic use but it’s rather verbose to read and traverse unless you use JSON specific tooling. In this post I take a look at a few options: jq, jless and fx.

@hamatti tbh I’m so bad at jq, I often use the Python interpreter to deal with JSON. :thisisfine:

Also I try to use protobuf a lot nowadays, especially for internal RPCs.

@shimst3r I also often jump into Python whenever my jq (or shell scripting) skills fall short.

@hamatti @shimst3r Have you tried Jello? It’s Jq but with Python-like syntax – much nicer to use!

@tero @shimst3r

Looks interesting, I need to check this out. I hadn't heard of it before!

Tero Ykspetäjä

@hamatti @shimst3r I found it quite a while ago (probably while trying to google how to do something in jq 😀) and haven’t gone back to jq since.