-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Float aware mini #102
Float aware mini #102
Conversation
Patching the library makes #80 no longer applicable. |
The d0821adf0e7934f27a8eb5c2fe9b8254e4's change seems odd. It was an intentional change by Lemire, but it's a lossy change. We might want to change (or at least make this configurable) upstream. @lemire? |
@edgarsi since it looks like this will get changed upstream, want to change this PR to your doc fixes and new tests? I'll update the bundled simdjson when fix is committed. |
Let's see if it really gets changed upstream. |
@edgarsi It will get changed. We just want to make sure that all tests are fine. |
You could upgrade to 3.0.1. |
See now. Btw, the change in this project, and in simdjson, feels like a breaking change. It's in questionable territory at least. |
Done in #110. As it may change behavior, it's behind a major version bump. |
simdjson minify drops the trailing '.0' from floats, which is fine by JSON spec,
but matters in practice. For example, Elasticsearch dynamic field type detection
is affected. In general, Python distinguishes between int and float, so various
type guarantees may fail. The dump/load cycle should not convert types for a few
byte gain. Let users explicitly convert types, if they need to.
This modifies minify, so it does not drop the '.0'.
Note: simdjson started dropping '.0' with d0821adf0e7934f27a8eb5c2fe9b8254e4.