mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
feat: add support for 128 bit HashMap key serialization
This commit is contained in:
parent
27a4ca9d7a
commit
5416cee6c5
@ -505,6 +505,10 @@ impl serde::Serializer for MapKeySerializer {
|
|||||||
Ok(value.to_string())
|
Ok(value.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn serialize_i128(self, value: i128) -> Result<String> {
|
||||||
|
Ok(value.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn serialize_u8(self, value: u8) -> Result<String> {
|
fn serialize_u8(self, value: u8) -> Result<String> {
|
||||||
Ok(value.to_string())
|
Ok(value.to_string())
|
||||||
}
|
}
|
||||||
@ -521,6 +525,10 @@ impl serde::Serializer for MapKeySerializer {
|
|||||||
Ok(value.to_string())
|
Ok(value.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn serialize_u128(self, value: u128) -> Result<String> {
|
||||||
|
Ok(value.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn serialize_f32(self, value: f32) -> Result<String> {
|
fn serialize_f32(self, value: f32) -> Result<String> {
|
||||||
if value.is_finite() {
|
if value.is_finite() {
|
||||||
Ok(ryu::Buffer::new().format_finite(value).to_owned())
|
Ok(ryu::Buffer::new().format_finite(value).to_owned())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user