aeson-combinators 0.0.4.1 → 0.0.5.0
raw patch · 4 files changed
+13/−8 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−0
- README.md +0/−3
- aeson-combinators.cabal +2/−2
- test/JSONEncodeSpec.hs +8/−3
CHANGELOG.md view
@@ -1,5 +1,8 @@ # Revision history for aeson-combinators +## 0.0.5.0 -- 2021-03-13+* make test suite compatible with hashable 1.3.1.0+ ## 0.0.4.1 -- 2021-02-14 * Cleanup README * CI maintanance & GHC compatibility update
README.md view
@@ -9,9 +9,6 @@ This library is compatible with GHC as well as recent versions of **GHCJS**. -I wrote a [blob post](https://turbomack.github.io/posts/2020-02-21-value-space-decoding-for-aeson.html)-describing what this library attempts to solve.- ## Performance `Decoder a` type is a function `Value -> Parser a` the same as `parseJSON`
aeson-combinators.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: aeson-combinators-version: 0.0.4.1+version: 0.0.5.0 synopsis: Aeson combinators for dead simple JSON decoding description: Low overhead value space `Decoder`@@ -27,7 +27,7 @@ , GHCJS == 8.6.0.1 Flag doctest- default: True+ default: False manual: True library
test/JSONEncodeSpec.hs view
@@ -37,14 +37,19 @@ objectEncoding :: Spec objectEncoding = do let object = Object "Joe" 30- let json = "{\"age\":30,\"name\":\"Joe\"}" + -- poor man's workaround for key ordering+ -- see: https://github.com/haskell/aeson/issues/837+ let json res =+ res == "{\"age\":30,\"name\":\"Joe\"}"+ || res == "{\"name\":\"Joe\",\"age\":30}"+ describe "object encoding" $ do it "should encode using getter style encoding" $ do- JE.encode objectEncoder object `shouldBe` json+ JE.encode objectEncoder object `shouldSatisfy` json it "should encode using explicit style encoding" $ do- JE.encode objectEncoder' object `shouldBe` json+ JE.encode objectEncoder' object `shouldSatisfy` json listSpec :: Spec