@@ -2,52 +2,71 @@ For the latest version of this document, please see [https://github.com/bos/aeso
5−* Added list specific members to `ToJSON` and `FromJSON` classes. In the same
5+Major enhancements:
6− way `Read` / `Show` handle lists specifically. This removes need for
7− overlapping instances to handle `String`.
9−* Added higher rank classes: `ToJSON1`, `ToJSON2`, `FromJSON1`, and `FromJSON2`.
7+* Introduced new `FromJSONKey` and `ToJSONKey` type classes that are
8+ used to encode maps without going through HashMap
11−* Introduced new `FromJSONKey` and `ToJSONKey` type classes that is used to encode maps.
10+* Added higher rank classes: `ToJSON1`, `ToJSON2`, `FromJSON1`, and
13−* Integral `FromJSON` instances now only accepts integral values. E.g. parsing `3.14` will fail instead of succeeding with the value `3`.
13+* Added `Data.Aeson.Encoding` with functions to safely write `ToJSON`
14+ instances using `toEncoding`.
15−* Over/underflows are now caught for bounded numeric types.
16+Other enhancements:
18+* Added list specific members to `ToJSON` and `FromJSON` classes. In
19+ the same way `Read` and `Show` handle lists specifically. This
20+ removes need for overlapping instances to handle `String`.
17−* Added `Data.Aeson.Encoding` with functions to safely write `ToJSON` instances using `toEncoding`.
22+* Added a new `sumEncoding` option `UntaggedValue` which prevents
23+ objects from being tagged with the constructor name.
19−* Added a new `sumEncoding` option `UntaggedValue` which prevents objects from being tagged with the constructor name.
25+* JSONPaths are now tracked in instances derived with template-haskell
28+* Get rid of redundancy of JSONPath error messages in nested records.
30+ `eitherDecode "{\"x\":{\"a\": [1,2,true]}}" :: Either String Y`
32+ `Error in $.x.a[2]: failed to parse field" x: failed to parse field a: expected Int, encountered Boolean`
33+ and now yields `Error in $.x.a[2]: expected Int, encountered Boolean"`.
35+ Some users might prefer to insert `modifyFailure` themselves to
36+ customize error messages, which previously prevented the use of
39+* Backwards compatibility with `bytestring-0.9` using the
40+ `bytestring-builder` compatibility package.
21* Export `decodeWith`, `decodeStrictWith`, `eitherDecodeWith`, and
42* Export `decodeWith`, `decodeStrictWith`, `eitherDecodeWith`, and
22 `eitherDecodeStrictWith` from `Data.Aeson.Parser`. This allows
43 `eitherDecodeStrictWith` from `Data.Aeson.Parser`. This allows
23 decoding using explicit parsers instead of using `FromJSON`
44 decoding using explicit parsers instead of using `FromJSON`
24 instances.
45 instances.
47+* Un-orphan internal instances to render them in haddocks.
51+* Integral `FromJSON` instances now only accept integral
52+ values. E.g. parsing `3.14` to `Int` fails instead of succeeding
55+* Over/underflows are now caught for bounded numeric types.
26* Remove the `contents` field encoding with `allNullaryToStringTag = False`,
57* Remove the `contents` field encoding with `allNullaryToStringTag = False`,
27 giving us `{ "tag" : "c1" }` instead of `{ "tag" : "c1", contents : [] }`.
58 giving us `{ "tag" : "c1" }` instead of `{ "tag" : "c1", contents : [] }`.
28− The contents field is optional when parsing so this is only a breaking change for ToJSON.
59+ The contents field is optional when parsing so this is only a breaking
60+ change for ToJSON instances.
30* Fix a bug where `genericToEncoding` with `unwrapUnaryRecords = True`
62* Fix a bug where `genericToEncoding` with `unwrapUnaryRecords = True`
31 would produce an invalid encoding: `"unwrap\":""`.
63 would produce an invalid encoding: `"unwrap\":""`.
33−* Get rid of redundancy of JSONPath error messages in nested records.
35− `eitherDecode "{\"x\":{\"a\": [1,2,true]}}" :: Either String Y`
36− previously yielded `Error in $.x.a[2]: failed to parse field" x:
37− failed to parse field a: expected Int, encountered Boolean` and now
38− yields `Error in $.x.a[2]: expected Int, encountered Boolean"`.
40− Some users might prefer to insert `modifyFailure` themselves to
41− customize error messages, which previously prevented the use of
44* `ToJSON` instances using `genericToEncoding` and `omitNothingFields`
65* `ToJSON` instances using `genericToEncoding` and `omitNothingFields`
45− no longer produces invalid JSON.
66+ no longer produce invalid JSON.
47* Added instances for `DList`, `Compose`, `Product`, `Sum`.
68* Added instances for `DList`, `Compose`, `Product`, `Sum`.
49−* Backwards compatibility with `bytestring-0.9` using the `bytestring-builder` compatibility package.
51### 0.11.2.0
70### 0.11.2.0
53* Enable `PolyKinds` to generalize `Proxy`, `Tagged`, and `Const` instances.
72* Enable `PolyKinds` to generalize `Proxy`, `Tagged`, and `Const` instances.