ie. non-printable, quotes or escapes. We allow these outside tokens
(we expect tabs and \n for example).
This is a big hammer, but if someone really wants we can add support
later.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Don't try to escape them. It's whack-a-mole and they shouldn't do it anyway.
Suggested-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
They don't currently, since callers check, but be safe. In addition,
handle NULL returns from these in the bitcoind code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Also, we split the more sophisticated json_add helpers to avoid pulling in
everything into lightning-cli, and unify the routines to print struct
short_channel_id (it's ':', not '/' too).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>