JSHON(1) 1 (jshon manual) JSHON(1) (NAME) jshon - JSON (SYNOPSIS) jshon -[P|S|Q|V|C|I|0] [-F path] -[t|l|k|u|p|a|j] -[s|n] value -[e|i|d] index (DESCRIPTION) jshon JSON . grep/sed/awk perl/python . jshon json stdin stdout . json . Bash jshon JSON . jshon (stack) JSON . (ACTIONS) . . jshon (pipe) . json : {"a":1,"b":[true,false,null,"str"],"c":{"d":4,"e":5}} jshon [actions] < sample.json -e -a . -t ( / type) string object array number bool null . jshon -t -> object -l ( / length) . string object array . jshon -l -> 3 -k ( / keys) . object . jshon -k -> a b c -e index ( / extract) json "index" . object array . . jshon -e c -> {"d":4,"e":5} -a ( / across) . object array . -a . jshon -e b -a -t -> bool bool null string -s value ( / string) json . (-i) . jshon -s "back\slash" -> "back\\slash" -n value (/ / nonstring/number) json . (-i) . 'true' 'false' 'null' 'array' 'object' . t f n [] {} . jshon -n object -> {} -u ( / unstring) . : string int real boolean null. jshon -e b -e 3 -u -> str -j ( json / json literal) json . string array object . -p ( / pop) . . jshon -e c -e d -u -p -e e -u -> 4 5 -d index ( / delete) . . jshon -d b -> {"a":1,"c":{"d":4,"e":5}} -i index ( / insert) . extract . extract json . insert json / . extract json delete/string/nonstring insert . jshon -e a -i a -> the orginal json jshon -s one -i a -> {"a":"one", ...} . (overwrite) . 'append' . : (delete) -n/s . jshon -e b -d 0 -s q -i 0 -> {"b":"q",false,null,"str"} (NON-MANIPULATION) json . . -F ( / file) stdin . . -P (jsonp) jsonp . -S ( / sort) json . -Q ( / quiet) stderr "2> /dev/null" . -V ( / by-value) (pass-by-value) . jshon . by-value by-reference . by-reference json . jshon -e c -n 7 -i d -p -> c["d"] == 7 jshon -V -e c -n 7 -i d -p -> c["d"] == 5 jshon -V -e c -n 7 -i d -i c -> c["d"] == 7 -V (pop) . -C ( / continue) . 'null' . . -I ( / in-place) . -F . json . . -0 ( / null delimiters) -u null . -u . --version YYYYMMDD . (OTHER TOOLS) jshon . (tab) . 'paste' . paste . : jshon ... | sed 's/^$/-/' | paste -s -d '\t\t\n' '-' . while : while { read -r var1 read -r var2 read -r var3 }; do [thing with vars] done < <(jshon ...) 'read' -0 read ( bash) IFS . : read -r -d $'\0' var1 json . json/ json . json . ( jshon ) json . : while read line; do jshon <<< "$line"; done < <(journalctl -o json) journalctl -o json | sed -e '1i[' -e '$!s/$/,/' -e '$a]' | jshon (GOLF) . -p(op) (golf) : jshon -e c -e d -u -p -e e -u == jshon -ec -ed -upee -u ( ) . (AUTHORS) jshon Kyle Keen Dave Reisner , AndrewF (BSD OSX jsonp ) Jean-Marc A (solaris) . (BUGS) ! . . . Linux 6.12.113+deb13-amd64 September 1, 2013 Linux 6.12.113+deb13-amd64