diff --git a/cli/lightning-cli.c b/cli/lightning-cli.c index 06e47f2b8..ede08a6b4 100644 --- a/cli/lightning-cli.c +++ b/cli/lightning-cli.c @@ -276,7 +276,7 @@ static bool is_literal(const char *arg) if (arglen == 0) { return false; } - return strspn(arg, "0123456789") == arglen + return strspn(arg, "0123456789.") == arglen || streq(arg, "true") || streq(arg, "false") || streq(arg, "null") diff --git a/doc/lightning-cli.1.md b/doc/lightning-cli.1.md index 254616c1d..263340bbe 100644 --- a/doc/lightning-cli.1.md +++ b/doc/lightning-cli.1.md @@ -89,7 +89,8 @@ this is to avoid having lightningd intrepret the position of an arguement. Arguments may be integer numbers (composed entirely of digits), floating-point numbers (has a radix point but otherwise composed of digits), *true*, *false*, -or *null*. Other arguments are treated as strings. +or *null*. Arguments which begin with *{*, *[* or *"* are also considered +raw JSON and are passed through. Other arguments are treated as strings. Some commands have optional arguments. You may use *null* to skip optional arguments to provide later arguments, although this is not encouraged.