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

Document that NumberFormat deviates from aeson #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Data/Aeson/Encode/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ data PState = PState { pLevel :: Int
data Indent = Spaces Int | Tab

data NumberFormat
-- | The standard behaviour of the 'Aeson.encode' function. Uses
-- integer literals for integers (1, 2, 3...), simple decimals
-- for fractional values between 0.1 and 9,999,999, and scientific
-- notation otherwise.
-- | For numbers with absolute value less than 1e19, this follows the standard
-- behaviour of the 'Data.Aeson.encode' function. Uses integer literals for
-- integers (1, 2, 3...), simple decimals for fractional values between 0.1
-- and 9,999,999, and scientific notation otherwise. For numbers with an
-- absolute value larger than 1e19, always uses scientific notation.
= Generic
-- | Scientific notation (e.g. 2.3e123).
| Scientific
Expand Down
Loading