mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
common: add simple json parse wrapper for the complete cases.
We're going to change the API on the more complete JSON parser, so make and use a simple API for the easy cases. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -89,6 +89,10 @@ const jsmntok_t *json_get_arr(const jsmntok_t tok[], size_t index);
|
||||
jsmntok_t *json_parse_input(const tal_t *ctx,
|
||||
const char *input, int len, bool *valid);
|
||||
|
||||
/* Simplified version of above which parses only a complete, valid
|
||||
* JSON string */
|
||||
jsmntok_t *json_parse_simple(const tal_t *ctx, const char *input, int len);
|
||||
|
||||
/* Convert a jsmntype_t enum to a human readable string. */
|
||||
const char *jsmntype_to_string(jsmntype_t t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user