Hello, I was recently trying to use msgpack to serialize data, and there seems to be an issue when deserializing zvariant values, the integer types are not correct. For example:
use zvariant::OwnedValue;
fn main() {
let foo = Foo { data: 9001.into() };
let serialized = rmp_serde::to_vec(&foo).expect("Failed to serialize");
let deserialized: Foo = rmp_serde::from_slice(&serialized).expect("Failed to deserialize");
assert_eq!(foo, deserialized)
}
#[derive(serde::Serialize, Debug, PartialEq, serde::Deserialize)]
struct Foo {
data: OwnedValue,
}
with
[dependencies]
rmp-serde = "1.1.2"
serde = { version = "1.0.189", features = ["derive"] }
zvariant = "3.15.0"
fails to run successfully, because
I am not exactly sure why this is happening, So i was wondering if someone could clue me on this.
Hello, I was recently trying to use msgpack to serialize data, and there seems to be an issue when deserializing zvariant values, the integer types are not correct. For example:
with
fails to run successfully, because
I am not exactly sure why this is happening, So i was wondering if someone could clue me on this.