on 0.8.1.0 help sign in
typeable/aeson/changelog.md
159 lines 5.2 kB history raw
10.8.1.0
3* Encoding a Scientific value with a huge exponent is now handled
4 efficiently. (This would previously allocate a huge
5 arbitrary-precision integer, potentially leading to a denial of
6 service.)
8* Handling of strings that contain backslash escape sequences is
9 greatly improved. For a pathological string containing almost a
10 megabyte of consecutive backslashes, the new implementation is 27x
11 faster and uses 42x less memory.
13* The ToJSON instance for UTCTime is rendered with higher (picosecond)
14 resolution.
16* The value parser now correctly handles leading whitespace.
18* New instances of ToJSON and FromJSON for Data.Sequence and
19 Data.Functor.Identity. The Value type now has a Read instance.
21* ZonedTime parser ordering now favours the standard JSON format,
22 increasing efficiency in the common case.
24* Encoding to a Text.Builder now escapes '<' and '>' characters, to
25 reduce XSS risk.
270.8.0.2
29* Fix ToJSON instance for 15-tuples (see #223).
310.8.0.1
33* Support time-1.5.
350.8.0.0
37* Add ToJSON and FromJSON instances for tuples of up to 15 elements.
390.7.1.0
41* Major compiler and library compatibility changes: we have dropped
42 support for GHC older than 7.4, text older than 1.1, and bytestring
43 older than 0.10.4.0. Supporting the older versions had become
44 increasingly difficult, to the point where it was no longer worth
45 it.
470.7.0.0
49* The performance of encoding to and decoding of bytestrings have both
50 improved by up to 2x, while also using less memory.
52* New dependency: the scientific package lets us parse floating point
53 numbers more quickly and accurately.
55* eitherDecode, decodeStrictWith: fixed bugs.
57* Added FromJSON and ToJSON instances for Tree and Scientific.
59* Fixed the ToJSON instances for UTCTime and ZonedTime.
610.6 series
63* Much improved documentation.
65* Angle brackets are now escaped in JSON strings, to help avoid XSS
66 attacks.
68* Fixed up handling of nullary constructors when using generic
69 encoding.
71* Added ToJSON/FromJSON instances for:
73 * The Fixed class
74 * ISO-8601 dates: UTCTime, ZonedTime, and TimeZone
76* Added accessor functions for inspecting Values.
78* Added eitherDecode function that returns an error message if
79 decoding fails.
810.5 to 0.6
83* This release introduces a slightly obscure, but
84 backwards-incompatible, change.
86 In the generic APIs of versions 0.4 and 0.5, fields whose names
87 began with a "_" character would have this character removed. This
88 no longer occurs, as it was both buggy and surprising
89 (https://github.com/bos/aeson/issues/53).
91* Fixed a bug in generic decoding of nullary constructors
92 (https://github.com/bos/aeson/issues/62).
940.4 to 0.5
96* When used with the UTF-8 encoding performance improvements
97 introduced in version 0.11.1.12 of the text package, this release
98 improves aeson's JSON encoding performance by 33% relative to aeson
99 0.4.
101 As part of achieving this improvement, an API change was necessary.
102 The fromValue function in the Data.Aeson.Encode module now uses the
103 text package's Builder type instead of the blaze-builder package's
104 Builder type.
1060.3 to 0.4
108* The new decode function complements the longstanding encode
109 function, and makes the API simpler.
111* New examples make it easier to learn to use the package
112 (https://github.com/bos/aeson/tree/master/examples).
114* Generics support
116 aeson's support for data-type generic programming makes it possible
117 to use JSON encodings of most data types without writing any
118 boilerplate instances.
120 Thanks to Bas Van Dijk, aeson now supports the two major schemes for
121 doing datatype-generic programming:
123 * the modern mechanism, built into GHC itself
124 (http://www.haskell.org/ghc/docs/latest/html/users_guide/generic-programming.html)
126 * the older mechanism, based on SYB (aka "scrap your
127 boilerplate")
129 The modern GHC-based generic mechanism is fast and terse: in fact,
130 its performance is generally comparable in performance to
131 hand-written and TH-derived ToJSON and FromJSON instances. To see
132 how to use GHC generics, refer to examples/Generic.hs.
134 The SYB-based generics support lives in Data.Aeson.Generic and is
135 provided mainly for users of GHC older than 7.2. SYB is far slower
136 (by about 10x) than the more modern generic mechanism. To see how
137 to use SYB generics, refer to examples/GenericSYB.hs.
139* We switched the intermediate representation of JSON objects from
140 Data.Map to Data.HashMap which has improved type conversion
141 performance.
143* Instances of ToJSON and FromJSON for tuples are between 45% and 70%
144 faster than in 0.3.
146* Evaluation control
148 This version of aeson makes explicit the decoupling between
149 *identifying* an element of a JSON document and *converting* it to
150 Haskell. See the Data.Aeson.Parser documentation for details.
152 The normal aeson decode function performs identification strictly,
153 but defers conversion until needed. This can result in improved
154 performance (e.g. if the results of some conversions are never
155 needed), but at a cost in increased memory consumption.
157 The new decode' function performs identification and conversion
158 immediately. This incurs an up-front cost in CPU cycles, but
159 reduces reduce memory consumption.