New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow f32
and f64
map keys
#1027
Merged
Merged
Commits on Jun 17, 2023
-
Now we allow objects with `f32` or `f64` string-serialized keys. For example: ```json { "1.123": "foo", "2.0": "bar" } ``` The `test_deny_float_key` test has been inverted, and the `deserialize_integer_key` macros have been renamed to `deserialize_numeric_key` in order to support `f32` and `f64`.
Configuration menu - View commit details
-
Copy full SHA for 0503111 - Browse repository at this point
Copy the full SHA 0503111View commit details
Commits on Jul 9, 2023
-
Return error on non-finite float keys
This handles NaN and both positive and negative infinity.
Configuration menu - View commit details
-
Copy full SHA for f74b422 - Browse repository at this point
Copy the full SHA f74b422View commit details -
Print map float keys with
CompactFormatter
This ensures consistency with the default `Formatter::write_f32` output format used elsewhere.
Configuration menu - View commit details
-
Copy full SHA for 9963405 - Browse repository at this point
Copy the full SHA 9963405View commit details -
Deserialize float keys using
deserialize_number
`deserialize_numeric_key!` has been renamed back to `deserialize_integer_key!`, and a new float-specific `deserialize_float_key!` macro has been introduced. This new macro attempts to deserialize float keys by delegating to the equivalent parent deserializer method.
Configuration menu - View commit details
-
Copy full SHA for 22a5e9b - Browse repository at this point
Copy the full SHA 22a5e9bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 324c5b5 - Browse repository at this point
Copy the full SHA 324c5b5View commit details -
Fix builds without
std
featureAn `unwrap` has been changed to simply discard the `Result`. We assume that writing to a `Vec` will never fail because the `std::io::Write` implementation never creates an I/O error.
Configuration menu - View commit details
-
Copy full SHA for 18e1b59 - Browse repository at this point
Copy the full SHA 18e1b59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5762701 - Browse repository at this point
Copy the full SHA 5762701View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7760a1a - Browse repository at this point
Copy the full SHA 7760a1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b0dbac7 - Browse repository at this point
Copy the full SHA b0dbac7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 468a94a - Browse repository at this point
Copy the full SHA 468a94aView commit details
Commits on Jul 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a4e2719 - Browse repository at this point
Copy the full SHA a4e2719View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.