lightningd/json: Add a json helper to append any jsmn token to a stream

This commit is contained in:
darosior
2019-09-27 00:43:31 +02:00
committed by Christian Decker
parent 187d2e0f26
commit dd10b543da
2 changed files with 47 additions and 0 deletions

View File

@@ -217,4 +217,8 @@ struct command_result *param_bitcoin_address(struct command *cmd,
const jsmntok_t *tok,
const u8 **scriptpubkey);
/* Add any json token */
void json_add_tok(struct json_stream *result, const char *fieldname,
const jsmntok_t *tok, const char *buffer);
#endif /* LIGHTNING_LIGHTNINGD_JSON_H */