trait ParseJsonNumber: Sized {
// Required method
fn parse(s: &[u8]) -> Option<Self>;
}Expand description
A trait for JSON-specific primitive parsing logic
According to the specification unquoted fields should be parsed as a double-precision
floating point numbers, including scientific representation such as 2e3
In practice, it is common to serialize numbers outside the range of an f64 and expect
them to round-trip correctly. As such when parsing integers we first parse as the integer
and fallback to parsing as a floating point if this fails
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".