We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey there! Here's a little edge case that isn't working:
#[test] fn test_newtype_bytes(){ #[derive(Debug, serde::Deserialize, serde::Serialize)] struct Test(serde_bytes::ByteBuf); let data = br#"{"/": {"bytes": "dm14"}}"#; let bytes: Test = serde_ipld_dagjson::de::from_slice(data).unwrap(); let expected = serde_bytes::ByteBuf::from([118, 109, 120]); assert_eq!(bytes.0, expected); }
called Result::unwrap() on an Err value: Message("invalid type: map, expected byte array at line 1 column 0")
Result::unwrap()
Err
Same problem with using the #[serde(with = "serde_bytes")].
#[serde(with = "serde_bytes")]
However if I add #[serde(transparent)], then it works.
#[serde(transparent)]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey there!
Here's a little edge case that isn't working:
Same problem with using the
#[serde(with = "serde_bytes")]
.However if I add
#[serde(transparent)]
, then it works.The text was updated successfully, but these errors were encountered: