| 2560 | } |
| 2561 | |
| 2562 | struct listpeers_channel **json_to_listpeers_channels(const tal_t *ctx, |
| 2563 | const char *buffer, |
| 2564 | const jsmntok_t *tok) |
| 2565 | { |
| 2566 | size_t i; |
| 2567 | const jsmntok_t *iter; |
| 2568 | const jsmntok_t *channelstok = json_get_member(buffer, tok, "channels"); |
| 2569 | struct listpeers_channel **chans; |
| 2570 | |
| 2571 | chans = tal_arr(ctx, struct listpeers_channel *, 0); |
| 2572 | json_for_each_arr(i, iter, channelstok) { |
| 2573 | struct listpeers_channel *chan; |
| 2574 | |
| 2575 | chan = json_to_listpeers_channel(chans, buffer, iter); |
| 2576 | if (!chan) |
| 2577 | continue; |
| 2578 | tal_arr_expand(&chans, chan); |
| 2579 | } |
| 2580 | return chans; |
| 2581 | } |
| 2582 | |
| 2583 | struct createonion_response *json_to_createonion_response(const tal_t *ctx, |
| 2584 | const char *buffer, |
no test coverage detected