• Poul-Henning Kamp's avatar
    Add support for JSON CLI responses. · e0b9077c
    Poul-Henning Kamp authored
    To get JSON back, the first argument must be "-j".
    
    Currently only "help -j" is implemented, but that
    will helpfully tell you which commands support
    json output.
    
    All JSON output has the form:
    
    	[ version#, [<cli_command>],
    		stuff
    	]
    
    For instance:
    
    	[ 1, ["help", "-j"],
    	  {
    	  "request": "help",
    	  "syntax": "help [<command>]",
    	  "help": "\tShow command/protocol help.",
    	  "minarg": 0, "maxarg": 1, "flags": "", "json": true
    	  },
    	  {
    	  "request": "ping",
    	  "syntax": "ping [<timestamp>]",
    	  "help": "\tKeep connection alive.",
    	  "minarg": 0, "maxarg": 1, "flags": "", "json": false
    	  },
    	  ...
    	]
    
    The string quoting for weird characters in JSON is XXX incomplete.
    
    Prodded for by:	Kristian
    e0b9077c
Name
Last commit
Last update
..
Makefile.am Loading commit data...
Makefile.phk Loading commit data...
binary_heap.c Loading commit data...
cli_auth.c Loading commit data...
cli_common.c Loading commit data...
cli_serve.c Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
flopen.c Loading commit data...
vas.c Loading commit data...
vav.c Loading commit data...
vct.c Loading commit data...
version.c Loading commit data...
vev.c Loading commit data...
vfil.c Loading commit data...
vin.c Loading commit data...
vlu.c Loading commit data...
vmb.c Loading commit data...
vnum.c Loading commit data...
vpf.c Loading commit data...
vre.c Loading commit data...
vrnd.c Loading commit data...
vsa.c Loading commit data...
vsb.3 Loading commit data...
vsb.c Loading commit data...
vsha256.c Loading commit data...
vss.c Loading commit data...
vsub.c Loading commit data...
vtcp.c Loading commit data...
vtim.c Loading commit data...