aeson-schemas 1.3.0 → 1.3.1
raw patch · 4 files changed
+28/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- aeson-schemas.cabal +3/−2
- bench/Benchmarks/FromJSON.hs +3/−2
- test/wont-compile/GetMissingKey.hs +16/−0
CHANGELOG.md view
@@ -1,5 +1,11 @@ ## Upcoming +## 1.3.1++Bug fixes:++* Update extra-source-files with files needed for testing+ ## 1.3.0 Breaking changes:
aeson-schemas.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: d195684258f0bf8fc5b3ab749824dc20c842da7acdb82d6e7aeb9e03c6165e28+-- hash: 82900f71614e4d0f5e4144719819585f4e34452136bb4bd5c4f9a7fd4f1b495c name: aeson-schemas-version: 1.3.0+version: 1.3.1 synopsis: Easily consume JSON data on-demand with type-safety description: Parse JSON data easily and safely without defining new data types. Useful for deeply nested JSON data, which is difficult to parse using the default@@ -47,6 +47,7 @@ test/goldens/sumtype_decode_invalid.golden test/goldens/unwrapqq_unwrap_past_list.golden test/goldens/unwrapqq_unwrap_past_tuple.golden+ test/wont-compile/GetMissingKey.hs source-repository head type: git
bench/Benchmarks/FromJSON.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -freduction-depth=0 #-}@@ -10,7 +11,7 @@ import Criterion.Main import qualified Data.Aeson as Aeson -import Data.Aeson.Schema (Object)+import Data.Aeson.Schema (IsSchema, Object) import Benchmarks.Data.Objects import Benchmarks.Data.Schemas@@ -37,5 +38,5 @@ {- Orphans -} -instance Show (Object schema) => NFData (Object schema) where+instance IsSchema schema => NFData (Object schema) where rnf = rnf . show
+ test/wont-compile/GetMissingKey.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE ScopedTypeVariables #-}++import Data.Aeson (decode)+import Data.Maybe (fromJust)++import Data.Aeson.Schema++o :: Object [schema| { foo: Bool } |]+o = fromJust $ decode "{ \"foo\": true }"++result :: _+result = [get| o.missing |]