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

[primitive-types] support deserializing H256 et al from bytes as well as hex strings #669

Closed
jsdw opened this issue Aug 26, 2022 · 0 comments · Fixed by #668
Closed

[primitive-types] support deserializing H256 et al from bytes as well as hex strings #669

jsdw opened this issue Aug 26, 2022 · 0 comments · Fixed by #668

Comments

@jsdw
Copy link
Contributor

jsdw commented Aug 26, 2022

H256 et al serialize to hex strings, presumably to make things a little nicer when working with JSON.

How about we add support to allow them to be deserialized from bytes as well as just hex strings, which is another natural way to represent these things in the serde data model, and allows for better interaction via crates like scale-value (and any other types that prefer to serialize to bytes rather than hex strings), eg: https://github.com/luketchang/scale-value-deser/blob/main/src/main.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant