mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 06:44:24 +01:00
lightningd: don't add null for unset plugin options.
In general, we don't like to use `null` in JSON: simply omit the field. I found this one because it broke our 'msat' parsing (made stricter in followup) which doesn't allow `null`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: `listconfigs` `plugins` `options` which are not set are omitted, not `null`.
This commit is contained in:
@@ -1952,7 +1952,8 @@ void json_add_opt_plugins_array(struct json_stream *response,
|
||||
opt->type,
|
||||
opt->values[0]);
|
||||
} else {
|
||||
json_add_null(response, opt_name);
|
||||
if (deprecated_apis)
|
||||
json_add_null(response, opt_name);
|
||||
}
|
||||
}
|
||||
json_object_end(response);
|
||||
|
||||
Reference in New Issue
Block a user