aeson-optics 1.2.0.1 → 1.2.1
raw patch · 3 files changed
+12/−15 lines, 3 filesdep −attoparsecdep ~aesondep ~basedep ~bytestringPVP ok
version bump matches the API change (PVP)
Dependencies removed: attoparsec
Dependency ranges changed: aeson, base, bytestring, text
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- aeson-optics.cabal +6/−6
- src/Data/Aeson/Optics.hs +2/−9
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.2.1++* Drop dependency on `attoparsec`. Use `aeson`s `decode` to parse `Value`.+ # 1.2.0.1 * Drop direct dependency on `unordered-containers`
aeson-optics.cabal view
@@ -1,4 +1,4 @@-version: 1.2.0.1+version: 1.2.1 name: aeson-optics category: Data, JSON, Optics license: MIT@@ -22,8 +22,9 @@ || ==8.8.4 || ==8.10.7 || ==9.0.2- || ==9.2.4- || ==9.4.1+ || ==9.2.8+ || ==9.4.5+ || ==9.6.2 synopsis: Law-abiding optics for aeson description: Law-abiding optics for aeson.@@ -39,9 +40,8 @@ library default-language: Haskell2010 build-depends:- aeson >=2.0.3.0 && <2.2- , attoparsec >=0.13.1.0 && <0.15- , base >=4.10 && <4.18+ aeson >=2.0.3.0 && <2.3+ , base >=4.10 && <4.19 , bytestring >=0.10.8.1 && <0.12 , optics-core >=0.4.1 && <0.5 , optics-extra >=0.4.1 && <0.5
src/Data/Aeson/Optics.hs view
@@ -51,9 +51,7 @@ import Prelude hiding (null) import Data.Aeson- (FromJSON, Result (..), ToJSON, Value (..), encode, fromJSON, toJSON)-import Data.Aeson.Parser (value)-import Data.Attoparsec.ByteString.Lazy (maybeResult, parse)+ (FromJSON, Result (..), ToJSON, Value (..), encode, fromJSON, toJSON, decode) import Data.Scientific (Scientific) import Data.Text (Text) import Data.Text.Optics (packed)@@ -381,12 +379,7 @@ {-# INLINE _JSON #-} instance AsJSON LBS.ByteString where- _JSON = prism' encode decodeValue- where- decodeValue :: (FromJSON a) => LBS.ByteString -> Maybe a- decodeValue s = maybeResult (parse value s) >>= \x -> case fromJSON x of- Success v -> Just v- _ -> Nothing+ _JSON = prism' encode decode {-# INLINE _JSON #-} instance AsJSON String where