Skip to content

Commit c8831dd

Browse files
committed
Prepare 2.2 release.
- Bump bounds - Update changelog
1 parent f8b5413 commit c8831dd

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

aeson.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: aeson
2-
version: 2.2
2+
version: 2.2.0.0
33
license: BSD3
44
license-file: LICENSE
55
category: Text, Web, JSON
@@ -112,7 +112,7 @@ library
112112
build-depends:
113113
data-fix >=0.3.2 && <0.4
114114
, dlist >=1.0 && <1.1
115-
, hashable >=1.3.5.0 && <1.5
115+
, hashable >=1.4.2.0 && <1.5
116116
, indexed-traversable >=0.1.2 && <0.2
117117
, integer-conversion >=0.1 && <0.2
118118
, network-uri >=2.6.4.1 && <2.7
@@ -129,7 +129,7 @@ library
129129
, these >=1.2 && <1.3
130130
, unordered-containers >=0.2.10.0 && <0.3
131131
, uuid-types >=1.0.5 && <1.1
132-
, vector >=0.12.0.1 && <0.14
132+
, vector >=0.13.0.0 && <0.14
133133
, witherable >=0.4.2 && <0.5
134134

135135
ghc-options: -Wall

changelog.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ For the latest version of this document, please see [https://github.com/haskell/
2020
Additionall "boring" types like `()` and `Proxy` are omitted as well.
2121
As the omitting is now uniform, type arguments are also omitted (also in `Generic1` derived instance).
2222

23-
Resolves issues
24-
[#687](https://github.com/haskell/aeson/issues/687),
25-
[#571](https://github.com/haskell/aeson/issues/571),
26-
[#792](https://github.com/haskell/aeson/issues/792).
23+
Resolves issues:
24+
25+
- [#687](https://github.com/haskell/aeson/issues/687) Derived ToJSON1 instance does not respect omitNothingFields = True,
26+
- [#571](https://github.com/haskell/aeson/issues/571) omitNothingFields not used in Generic Decode,
27+
- [#792](https://github.com/haskell/aeson/issues/792) Make Proxy fields optional.
2728

2829
* Use `Data.Aeson.Decoding` parsing functions (introduced in version 2.1.2.0) as default in `Data.Aeson`.
2930
As one side-effect, `decode` and `decode'` etc pair functions are operationally the same.
@@ -33,12 +34,18 @@ For the latest version of this document, please see [https://github.com/haskell/
3334

3435
* 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.
3536
* 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`.
37+
Formats accepted is slightly changed:
38+
- The space between time and timezone offset (in `UTCTime` and `ZonedTime`) is disallowed. ISO8601 explictly forbidds it.
39+
- The timezone offsets can be in range -23:59..23:59. This is how Python, joda-time etc seems to do. (Previously the range was -12..+14)
40+
3641
* Remove `cffi` flag. Toggling the flag made `aeson` use a C implementation for string unescaping (used for `text <2` versions).
3742
The new native Haskell implementation (introduced in version 2.0.3.0) is at least as fast.
3843
* Drop instances for `Number` from `attoparsec` package.
3944
* Improve `Arbitrary Value` instance.
4045
* Add instances for `URI` from `network-uri`.
4146
* add instances for `Down` from `Data.Ord`.
47+
* Use `integer-conversion` for converting `Text` and `ByteString`s into `Integer`s.
48+
* Bump lower bounds of non GHC-boot lib dependencies.
4249

4350
### 2.1.2.1
4451

text-iso8601/src/Data/Time/FromText.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ parseTimeZone__ x kont c t0 = case c of
488488

489489
withResult :: (Int -> Int) -> Int -> Int -> (Local.TimeZone -> Either String b) -> Either String b
490490
withResult posNeg hh mm kontR =
491+
-- we accept hours <24 and minutes <60
492+
-- this is how grammar implies, and also how python, joda-time
493+
-- and clojure #inst literals seem to work.
494+
-- Java's java.time seems to restrict to -18..18: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneOffset.html
495+
-- but that seems more arbitrary.
491496
if hh < 24 && mm < 60
492497
then kontR (Local.minutesToTimeZone (posNeg (hh * 60 + mm)))
493498
else Left $ "Invalid TimeZone:" ++ show (hh, mm)

0 commit comments

Comments
 (0)