Skip to content
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

Double values should always be serialized with decimal point #3657

Closed
russcam opened this issue Apr 10, 2019 · 1 comment
Closed

Double values should always be serialized with decimal point #3657

russcam opened this issue Apr 10, 2019 · 1 comment

Comments

@russcam
Copy link
Contributor

russcam commented Apr 10, 2019

With the move to utf8json in #3493, floating point and decimal numbers that do not have fractional values are not serialized with decimal point by utf8json. This saves a few bytes, but would break Elasticsearch type mapping inference. Floating point and decimals should always be sent with a decimal point.

russcam added a commit that referenced this issue Apr 11, 2019
This commit updates

- the DoubleToStringConverter from utf8json to
always emit a trailing decimal point and trailing decimal value when
serializing floating point numbers to JSON.
- the DecimalFormatter from utf8json to always emit a trailing decimal
point and trailing decimal value when serializing floating point numbers to JSON.

Update unit tests to reflect this change

Fixes #3657
russcam added a commit that referenced this issue Apr 11, 2019
…3660)

This commit updates

- the DoubleToStringConverter from utf8json to
always emit a trailing decimal point and trailing decimal value when
serializing floating point numbers to JSON.
- the DecimalFormatter from utf8json to always emit a trailing decimal
point and trailing decimal value when serializing floating point numbers to JSON.

Update unit tests to reflect this change

Fixes #3657
@russcam
Copy link
Contributor Author

russcam commented Apr 12, 2019

Closing this as #3660 has been merged into 7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant