Skip to content

How to format float in simple notation, not scientific one: e.g. 1695979657.74, not 1.69597965774e+09 #141

Answered by ohler55
piotr-g asked this question in Q&A
Discussion options

You must be logged in to vote

The current develop branch now has a ojg.Option.FloatFormat which can be used when writing floats. Not much I can do about the json.Number other than providing an option for something other than jsonNumber when a number is too large but that doesn't solve the json.Number output flexibility.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@piotr-g
Comment options

@ohler55
Comment options

@ohler55
Comment options

Answer selected by piotr-g
@piotr-g
Comment options

@ohler55
Comment options

@ohler55
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants