Currently by default this crate supports numbers up to 64-bits. For larger types it is necessary to enable the arbitrary_precision feature, which treats numbers as strings. Whilst this works, it can have unintended consequences as it changes the semantics of how integers are fed into the serde machinery - see #845.
I wonder if serde_json might add support for 128-bit types within Number and the associated serializer implementations on platforms that support such types - e.g. by using serde_if_integer128. This would allow crates to use 128-bit types without needing to opt-in to arbitrary_precision.
I would be happy to contribute a PR if this is an acceptable course of action?
Currently by default this crate supports numbers up to 64-bits. For larger types it is necessary to enable the
arbitrary_precisionfeature, which treats numbers as strings. Whilst this works, it can have unintended consequences as it changes the semantics of how integers are fed into the serde machinery - see #845.I wonder if serde_json might add support for 128-bit types within
Numberand the associated serializer implementations on platforms that support such types - e.g. by using serde_if_integer128. This would allow crates to use 128-bit types without needing to opt-in toarbitrary_precision.I would be happy to contribute a PR if this is an acceptable course of action?