brave-browser icon indicating copy to clipboard operation
brave-browser copied to clipboard

Implement function in rust json lib to convert all u64 to strings

Open onyb opened this issue 2 years ago • 0 comments

We want a function in components/json/rs/src/lib.rs with the following signature:

pub fn convert_all_uint64_to_string(json: &str) -> String

It should be able to convert any u64 number in the json into a string, like this:

{"lamports": 18446744073709551615} -> {"lamports": "18446744073709551615"}
{"some": [{"deeply": {"nested": [{"path": 123}]}}]} -> {"some": [{"deeply": {"nested": [{"path": "123"}]}}]}

onyb avatar Aug 10 '22 10:08 onyb