You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add combinators for using omit* stuff in manually written instances
- Add Manual tests
- Cleanup OptionalFields.Common
- Fix TH and Generics
- Add combinators ToJSON1/2 and FromJSON1/2
- Const, Identity, Tagged and other newtypes
- Fix#687. ToJSON1 respects omitting fields
- Fix#571. Introduce allowOmittedFields to Generics/TH options.
- Resolve#792. () and Proxy can be omitted
Copy file name to clipboardexpand all lines: changelog.md
+25-7
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,30 @@
1
1
For the latest version of this document, please see [https://github.com/haskell/aeson/blob/master/changelog.md](https://github.com/haskell/aeson/blob/master/changelog.md).
2
2
3
-
### 2.2
4
-
5
-
* Use `Data.Aeson.Decoding` parsing functions as default in `Data.Aeson`.
6
-
* Move `Data.Aeson.Parser` module into separate `attoparsec-aeson` package, as these parsers are not used by `aeson` itself anymore.
7
-
* Remove `cffi` flag. Then the C implementation for string unescaping was used for `text <2` versions.
8
-
The new native Haskell implementation introduced in version 2.0.3.0 is at least as fast.
9
-
* Drop instances for `attoparsec.Number`.
3
+
### 2.2.0.0
4
+
5
+
* Rework how `omitNothingFields` works. Add `allowOmittedFields` as a parsing counterpart.
6
+
7
+
New type-class members were added: `omitField :: a -> Bool` to `ToJSON` and `omittedField :: Maybe a` to `FromJSON`.
8
+
These control which fields can be omitted.
9
+
The `.:?=`, `.:!=` and `.?=` operators were added to make use of these new members.
10
+
GHC.Generics and Template Haskell deriving has been updated accordingly.
11
+
12
+
In addition to `Maybe` (and `Option`) fields the `Data.Monoid.First` and `Data.Monoid.Last` are also omitted,
13
+
as well as the most newtype wrappers, when their wrap omittable type (e.g. newtypes in `Data.Monoid` and `Data.Semigroup`, `Identity`, `Const`, `Tagged`, `Compose`).
14
+
Additionall "boring" types like `()` and `Proxy` can be omitted as well.
15
+
As the omitting is now uniform, type arguments are also omitted (also in `Generic1` derived instance).
* Use `Data.Aeson.Decoding` parsing functions (introduced in version 2.1.2.0) as default in `Data.Aeson`.
23
+
* Move `Data.Aeson.Parser` module into separate [`attoparsec-aeson`](https://hackage.haskell.org/package/attoparsec-aeson) package, as these parsers are not used by `aeson` itself anymore.
24
+
* Use [`text-iso8601`](https://hackage.haskell.org/package/text-iso8601) package for parsing `time` types. These are slightly faster than previously used (copy of) `attoparsec-iso8601`.
25
+
* Remove `cffi` flag. Toggling the flag made `aeson` use a C implementation for string unescaping (used for `text <2` versions).
26
+
The new native Haskell implementation (introduced in version 2.0.3.0) is at least as fast.
27
+
* Drop instances for `Number` from `attoparsec` package.
0 commit comments