Skip to content

Commit

Permalink
decode json
Browse files Browse the repository at this point in the history
  • Loading branch information
neodix42 committed Dec 22, 2024
1 parent f94946a commit c411f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/generate-random-id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) {

td::BufferSlice bs(key);
TRY_RESULT_PREFIX(data, td::read_file(key.str()), "failed to read addr-list: ");
TRY_RESULT_PREFIX(as_json_value, td::json_decode(data), "bad addr list JSON: ");
TRY_RESULT_PREFIX(as_json_value, td::json_decode(data.as_slice()), "bad addr list JSON: ");
ton::tl_object_ptr<ton::ton_api::adnl_addressList> addr_list_tl;
TRY_STATUS_PREFIX(td::from_json(addr_list_tl, std::move(as_json_value)), "bad addr list TL: ");
TRY_RESULT_PREFIX_ASSIGN(addr_list, ton::adnl::AdnlAddressList::create(addr_list_tl), "bad addr list: ");
Expand Down

0 comments on commit c411f19

Please sign in to comment.