Show pageOld revisionsBacklinksFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== jo ====== A command-line utility for generating JSON text from its arguments, with a name almost as questionable as [[jq]]. ===== Usage ===== <code shell-session> $ jo foo=42 bar=69 {"foo": 42, "bar": 69} $ jo point[x]=32 point[y]=64 # or $ jo point=$(jo x=32 y=64) {"point": {"x": 32, "y": 64}} $ jo numbers[]=1 numbers[]=2 numbers=3 # or $ jo numbers=$(jo -a 1 2 3) {"numbers": [1, 2, 3]} $ jo -- bool@t otherbool=false empty= -s notbool=true {"bool": true, "otherbool": false, "empty": null, "notbool": "true"} </code> ===== Resources ===== * [[https://github.com/jpmens/jo/blob/master/jo.md|man page]] (slightly out of date) {{tag>cli}} jo.txt Last modified: 2024-10-12 01:42by asdf