aeson-value-parser 0.17 → 0.17.1
raw patch · 2 files changed
+8/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Aeson.ValueParser: nullableMonoid :: Monoid a => Value a -> Value a
Files
aeson-value-parser.cabal view
@@ -1,5 +1,5 @@ name: aeson-value-parser-version: 0.17+version: 0.17.1 synopsis: API for parsing "aeson" JSON tree into Haskell types description: A flexible parser DSL of JSON AST produced by the \"aeson\" library
library/Aeson/ValueParser.hs view
@@ -13,6 +13,7 @@ array, null, nullable,+ nullableMonoid, string, number, bool,@@ -121,6 +122,12 @@ nullable (Value parser) = Value $ ReaderT $ \ case Aeson.Null -> pure Nothing x -> fmap Just (runReaderT parser x)++{-# INLINE nullableMonoid #-}+nullableMonoid :: Monoid a => Value a -> Value a+nullableMonoid (Value parser) = Value $ ReaderT $ \ case+ Aeson.Null -> pure mempty+ x -> runReaderT parser x {-# INLINE string #-} string :: String a -> Value a