mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
common: helper to get id field as a string.
We'll be doing this quite a bit, so provide common helper. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -62,6 +62,10 @@ const jsmntok_t *json_get_member(const char *buffer, const jsmntok_t tok[],
|
||||
/* Get index'th array member. */
|
||||
const jsmntok_t *json_get_arr(const jsmntok_t tok[], size_t index);
|
||||
|
||||
/* Helper to get "id" field from object. */
|
||||
const char *json_get_id(const tal_t *ctx,
|
||||
const char *buffer, const jsmntok_t *obj);
|
||||
|
||||
/* Allocate a starter array of tokens for json_parse_input */
|
||||
jsmntok_t *toks_alloc(const tal_t *ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user