serde-hex icon indicating copy to clipboard operation
serde-hex copied to clipboard

Support deserialization from an owned value

Open thomaseizinger opened this issue 4 years ago • 0 comments

First, thanks for this awesome crate! It makes working with hex-encoded data really a breeze :)

We've ran into a nasty problem though when working with owned data. Concretely, given an owned serde_json::Value, trying to deserialize a struct that uses SerHex with serde_json::from_value fails because the underlying BytesVisitor that is used only supports borrowed data.

I am working on a patch that supports owned data by implementing a custom visitor.

thomaseizinger avatar Apr 01 '20 07:04 thomaseizinger