-
Notifications
You must be signed in to change notification settings - Fork 58
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
[Bug]: Error in deserialization : Err(Semantic(None, "invalid type: bytes, expected array")) on array of u8 #51
Comments
Also, this fails other way around. Serializing |
I've managed to solve the serialization issue with serde_bytes crate. Adding
|
@lig why is there a difference between Bytes and Vec<Value> where Value is an Integer ? #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct Integer {
number: N,
}
#[derive(Copy, Clone, Debug)]
enum N {
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
I128(i128),
USIZE(usize),
ISIZE(isize),
} I reimplement the integer.rs as an exemple: https://github.com/samuel-cavalcanti/ciborium/blob/main/ciborium/src/value/integer.rs |
Is there an existing issue for this?
Code of Conduct
Current Behaviour
This code :
Produce this error :
Expected Behaviour
Decoding bytes into a
Vec<u8>
or[u8; N]
would be niceEnvironment Information
Cargo.toml
:Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered: