mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
common/json_stream.c: provide explicit json_add_primitive_fmt and json_add_str_fmt routines.
Rather than a generic "add member", provide two routines: one which doesn't quote, and one which does. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
36a29fbfbc
commit
dbae5ae569
@@ -1563,8 +1563,7 @@ static void add_config(struct lightningd *ld,
|
||||
|| (!streq(buf, "") && strspn(buf, "0123456789.") == strlen(buf))) {
|
||||
/* Let pure numbers and true/false through as
|
||||
* literals. */
|
||||
json_add_literal(response, name0,
|
||||
buf, strlen(buf));
|
||||
json_add_primitive(response, name0, buf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user