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

Newtype for serde #65

Open
piegamesde opened this issue Sep 27, 2021 · 1 comment
Open

Newtype for serde #65

piegamesde opened this issue Sep 27, 2021 · 1 comment
Assignees

Comments

@piegamesde
Copy link

The serde support of this crate is just plain awesome. I use #[serde(with = "hex::serde")] all the time. However, I just ran into the situation where I want a Vec<Vec<u8>> to be encoded as a list of hex strings. This is a lot less straightforward to implement, sadly.

To make this more ergonomic, I suggest adding a serialization wrapper newtype that I may use instead of serde_with. I could then write something like Vec<HexBytes> or Vec<Hex<Vec<u8>>> and it would just work.

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

No branches or pull requests

2 participants