Changelog History
Page 6
-
v0.8.0.2 Changes
- ๐ Fix
ToJSON
instance for 15-tuples (see #223).
- ๐ Fix
-
v0.8.0.1 Changes
- ๐ Support
time-1.5
.
- ๐ Support
-
v0.8.0.0 Changes
- โ Add
ToJSON
andFromJSON
instances for tuples of up to 15 elements.
- โ Add
-
v0.7.1.0 Changes
- Major compiler and library compatibility changes: we have dropped
support for GHC older than 7.4,
text
older than 1.1, andbytestring
older than 0.10.4.0. Supporting the older versions had become increasingly difficult, to the point where it was no longer worth it.
- Major compiler and library compatibility changes: we have dropped
support for GHC older than 7.4,
-
v0.7.0.0 Changes
๐ The performance of encoding to and decoding of bytestrings have both improved by up to 2x, while also using less memory.
๐ New dependency: the
scientific
package lets us parse floating point numbers more quickly and accurately.๐
eitherDecode
,decodeStrictWith
: fixed bugs.โ Added
FromJSON
andToJSON
instances forTree
andScientific
.๐ Fixed the
ToJSON
instances forUTCTime
andZonedTime
.
-
v0.6 Changes
๐ Much improved documentation.
Angle brackets are now escaped in JSON strings, to help avoid XSS attacks.
๐ Fixed up handling of nullary constructors when using generic encoding.
โ Added
ToJSON
/FromJSON
instances for:- The
Fixed
class - ISO-8601 dates:
UTCTime
,ZonedTime
, andTimeZone
- The
โ Added accessor functions for inspecting
Value
s.โ Added
eitherDecode
function that returns an error message if decoding fails.
-
v0.5 Changes
- ๐ This release introduces a slightly obscure, but backwards-incompatible, change.
In the generic APIs of versions 0.4 and 0.5, fields whose names began with a
"_"
character would have this character removed. This no longer occurs, as it was both buggy and surprising (https://github.com/bos/aeson/issues/53).- ๐ Fixed a bug in generic decoding of nullary constructors (https://github.com/bos/aeson/issues/62).
-
v0.4 Changes
- ๐ When used with the UTF-8 encoding performance improvements
introduced in version 0.11.1.12 of the
text
package, this release improvesaeson
's JSON encoding performance by 33% relative toaeson
0.4.
As part of achieving this improvement, an API change was necessary. The
fromValue
function in theData.Aeson.Encode
module now uses thetext
package'sBuilder
type instead of theblaze-builder
package'sBuilder
type. - ๐ When used with the UTF-8 encoding performance improvements
introduced in version 0.11.1.12 of the
-
v0.3 Changes
The new
decode
function complements the longstandingencode
function, and makes the API simpler.๐ New examples make it easier to learn to use the package (https://github.com/bos/aeson/tree/master/examples).
๐ Generics support
aeson
's support for data-type generic programming makes it possible to use JSON encodings of most data types without writing any boilerplate instances.Thanks to Bas Van Dijk,
aeson
now supports the two major schemes for doing datatype-generic programming:the modern mechanism, built into GHC itself (http://www.haskell.org/ghc/docs/latest/html/users_guide/generic-programming.html)
the older mechanism, based on SYB (aka "scrap your boilerplate")
The modern GHC-based generic mechanism is fast and terse: in fact, its performance is generally comparable in performance to hand-written and TH-derived
ToJSON
andFromJSON
instances. To see how to use GHC generics, refer toexamples/Generic.hs
.The SYB-based generics support lives in
Data.Aeson.Generic
and is provided mainly for users of GHC older than 7.2. SYB is far slower (by about 10x) than the more modern generic mechanism. To see how to use SYB generics, refer toexamples/GenericSYB.hs
.We switched the intermediate representation of JSON objects from
Data.Map
toData.HashMap
which has improved type conversion performance.Instances of
ToJSON
andFromJSON
for tuples are between 45% and 70% faster than in 0.3.Evaluation control
This version of aeson makes explicit the decoupling between identifying an element of a JSON document and converting it to Haskell. See the
Data.Aeson.Parser
documentation for details.The normal
aeson
decode
function performs identification strictly, but defers conversion until needed. This can result in improved performance (e.g. if the results of some conversions are never needed), but at a cost in increased memory consumption.The new
decode'
function performs identification and conversion immediately. This incurs an up-front cost in CPU cycles, but reduces reduce memory consumption.