streams/util/shredder
2015-05-17 18:14:50 -07:00
..
jansson-2.6.tar.gz You'll need these to build jshon - warning these are typically blocked by .gitignore 2014-06-18 17:19:44 -07:00
jshon.tar.gz You'll need these to build jshon - warning these are typically blocked by .gitignore 2014-06-18 17:19:44 -07:00
JSON.sh Turns out Linux has a shred command in /usr/bin and its purpose is to over-write files so we don't want to invoke it accidentally. So as not to cause confusion and issues we will rename ours to "shredder". Aussies are of course allowed to alias this to "shredda". 2014-06-18 17:04:19 -07:00
OAuth.sh Turns out Linux has a shred command in /usr/bin and its purpose is to over-write files so we don't want to invoke it accidentally. So as not to cause confusion and issues we will rename ours to "shredder". Aussies are of course allowed to alias this to "shredda". 2014-06-18 17:04:19 -07:00
readme updated install doc 2015-02-20 13:18:44 -08:00
shredder cherry pick pull request #544 2014-07-24 19:07:04 -07:00
ShredOAuth.sh Implement permission checking for OAuth clients using the xperm table. Currently 'all' permissions are applied to OAuth clients which gives them the same rights as the channel owner and full access to API functions as the channel owner. However, individual permissions can now be created. These mirror the permission names from the normal permission table (although it isn't required that they do so). Lack of an xp_perm entry for the specified permission and lack of an 'all' override indicates permission denied. 2015-05-17 18:14:50 -07:00

http://kmkeen.com/jshon/



Jshon was made to be part of the usual text processing pipeline. However, every single -u is printed out to its own line. Most shell tools expect fields to be tab separated, and newlines between sets of fields. The paste tool does this. However, paste breaks down on blank lines so use sed to pad out the empty lines.

jshon ... | sed 's/^$/-/' |  paste -s -d "\t\t\n" | ....

The arguments need a little explaining.
-s is mysteriously needed for paste to correctly handle input.
-d is less obvious from the manpage, because it can take multiple characters which are looped through. The above example concatenates every three lines together.