core-lightning/lightningd/test
Rusty Russell bb7bbd03c5 lightningd: have json_stream_success start the "result" object.
"result" should always be an object (so that we can add new fields),
so make that implicit in json_stream_success.

This makes our primitives well-formed: we previously used NULL as our
fieldname when calling the first json_object_start, which is a hack
since we're actually in an object and the fieldname is 'result' (which
was already written by json_object_start).

There were only two cases which didn't do this:
1. dev-memdump returned an array.  No API guarantees on this.
2. shutdown returned a string.

I temporarily made shutdown return an empty object, which shouldn't
break anything, but I want to fix that later anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-12 02:00:15 +00:00
..
Makefile ccan: import ccan/json_out and ccan/json_escape. 2019-06-12 02:00:15 +00:00
run-find_my_abspath.c log: add 'warning' notification when log 2019-06-07 01:23:51 +00:00
run-invoice-select-inchan.c lightningd: have json_stream_success start the "result" object. 2019-06-12 02:00:15 +00:00
run-jsonrpc.c ccan: import ccan/json_out and ccan/json_escape. 2019-06-12 02:00:15 +00:00