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

Option to show small Double values not in exponential format in JSON #1262

Closed
mevogt opened this issue Dec 22, 2020 · 2 comments
Closed

Option to show small Double values not in exponential format in JSON #1262

mevogt opened this issue Dec 22, 2020 · 2 comments
Labels

Comments

@mevogt
Copy link

mevogt commented Dec 22, 2020

I'm looking for a way, that small Double values are not represented in exponential format within the JSON?

e.g. instead {"value": 1.0E-4} it should show {"value": 0.0001}

I've created a custom serializer using encodeString, but unfortunately there is no way to tell the encoder, that it should not print the quotes.

Is there a workaround?

(I'm using Version 1.0.1)

@mevogt mevogt changed the title Option to show Double values not in exponential format in JSON Option to show small Double values not in exponential format in JSON Dec 22, 2020
@sandwwraith
Copy link
Member

There's not such setting yet. Doubles are formatted in the same way as double.toString(). Do you have any particular use-case for that setting? Because JSON format does not give precedence to exponential format among the others

@shanshin
Copy link
Contributor

shanshin commented Nov 1, 2023

Implemented in #2041

@shanshin shanshin closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants