• 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
..
mgt.h Loading commit data...
mgt_acceptor.c Loading commit data...
mgt_child.c Loading commit data...
mgt_cli.c Loading commit data...
mgt_cli.h Loading commit data...
mgt_jail.c Loading commit data...
mgt_jail_solaris.c Loading commit data...
mgt_jail_unix.c Loading commit data...
mgt_main.c Loading commit data...
mgt_param.c Loading commit data...
mgt_param.h Loading commit data...
mgt_param_bits.c Loading commit data...
mgt_param_tbl.c Loading commit data...
mgt_param_tcp.c Loading commit data...
mgt_param_tweak.c Loading commit data...
mgt_pool.c Loading commit data...
mgt_shmem.c Loading commit data...
mgt_vcc.c Loading commit data...
mgt_vcl.c Loading commit data...