This takes a JSON-style format string, and does intelligent parsing, removing a lot of boilerplate from code which needs to deal with JSON. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>