Closed noppej closed 2 years ago
which obviously won't round-trip/deserialize as
u64
.
It will round-trip as a string. Going from serde string (serialize_str
) to YAML to u64 is not a "round-trip". Going from serde string to YAML to serde string is a round-trip. If this string value got serialized without quoted, it would not round trip.
Controlling the hex format of serialize_u64
is not something that I would want in this library, but it would be reasonable for someone else to implement a more fully featured YAML library for it.
Hi,
If I have a string in my YAML, such as
start: 0x20000000
then it deserializes correctly as au64
.However, when I use
serializer.serialize_str(format!("{:#010x}", memory_address).as_str())
, it will write the yaml with single quotes, e.g.start: '0x20000000'
, which obviously won't round-trip/deserialize asu64
.Am I missing something? Is there an easy way to remove those pesky single-quotes?