Source

aeson / Data / Aeson / Types / Instances.hs

The default branch has multiple heads

Author Commit Message Labels Comments Date
basvandijk
Add warning about space-usage on the Fixed instance
basvandijk
Use Scientific.toRealFloat instead of realToFrac in scientificToNumber
basvandijk
Renamed fromRealFloat back to fromFloatDigits I think the latter is more descriptive.
basvandijk
Use Scientific.fromRealFloat and Scientific.toRealFloat
basvandijk
Use floor on Scientifics again scientific-0.3 provides a DoS safe floor.
basvandijk
Fix #198 for Integral types. Fractional types are still unsafe! Integral types can now be parsed safely (bounded space usage). Parsing fractional types (Float and Double) still allows an attacker to fill up the memory of the target system by supplying a number with a large exponent. Fixing this is on my TODO list.
Bryan O'Sullivan
Improve parseJSON failure message for Either This fixes #193.
Tags
0.7.0.3
larskuhtz
Fix JSON instance for UTCTime to yield a valid ISO8601 string The value truncated to milliseconds by rounding down
basvandijk
Fix overflow bug in scientificToNumber
Bryan O'Sullivan
Fix instance of ToJSON for ZonedTime
Bryan O'Sullivan
Fix JSON instance for UTCTime This fixes gh-158.
Bryan O'Sullivan
Merge pull request #162 from basvandijk/master Encode RealFloat numbers using Scientific.fromFloatDigits
basvandijk
Nicer ToJSON instance from Number and Integer
basvandijk
Encode RealFloat numbers using Scientific.fromFloatDigits The previous code used realToFrac (fromRation . toRational) which approximates a floating point value. For example: > toRational (1.2::Double) 5404319552844595 % 4503599627370496 If you encode this Rational number to a Scientific number and render it you get: > encode (1.2::Double) "1.1999999999999999555910790149937383830547332763671875" Using Scientific.fromFloatDigits you get the expecte…
basvandijk
Add ToJSON and FromJSON instances for Scientific
Bryan O'Sullivan
Merge
Bryan O'Sullivan
Separate class definitions from instances