json.bash

v 0.2.2 Updated: 1 month, 2 weeks ago

Command-line tool and bash library that creates JSON

json.bash's one thing is to get shell-native data (environment variables, files, program output) to somewhere else, using JSON encapsulate it robustly. Creating JSON from the command line or a shell script can be useful when: - you need some ad-hoc JSON to interact with a JSON-consuming application, - you need to bundle up some data to share or move elsewhere. JSON can a good alternative to base64-encoding or a file archive. It does no transformation or filtering itself, instead it pulls data from things you already know how to use, like files, command-line arguments, environment variables, shell pipelines and shell scripts. It glues together data from these sources, giving it enough structure to make the data easy to consume reliably in downstream programs. It's something like a reverse tee — it pulls together data sources, using JSON to represent the aggregation. It's not an alternative to to data-processing tools like jq, rather it helps assemble JSON to send into JSON-consuming tools like jq.

https://github.com/h4l/json.bash

To install json.bash, paste this in macOS terminal after installing MacPorts

sudo port install json.bash

Add to my watchlist

Installations 0
Requested Installations 0