Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
onyb opened this issue Aug 10, 2022 · 0 comments · Fixed by brave/brave-core#14298
Closed

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

onyb opened this issue Aug 10, 2022 · 0 comments · Fixed by brave/brave-core#14298

Comments

@onyb
Copy link
Member

onyb commented Aug 10, 2022

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"}]}}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants