aeson-diff 1.1.0.8 → 1.1.0.9
raw patch · 3 files changed
+10/−6 lines, 3 filesdep ~basePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Data.Aeson.Patch: instance GHC.Generics.Generic Data.Aeson.Patch.Operation
+ Data.Aeson.Patch: instance GHC.Generics.Generic Data.Aeson.Patch.Patch
+ Data.Aeson.Pointer: instance GHC.Generics.Generic Data.Aeson.Pointer.Key
+ Data.Aeson.Pointer: instance GHC.Generics.Generic Data.Aeson.Pointer.Pointer
Files
- aeson-diff.cabal +2/−2
- lib/Data/Aeson/Patch.hs +4/−2
- lib/Data/Aeson/Pointer.hs +4/−2
aeson-diff.cabal view
@@ -1,5 +1,5 @@ name: aeson-diff-version: 1.1.0.8+version: 1.1.0.9 synopsis: Extract and apply patches to JSON documents. description: .@@ -34,7 +34,7 @@ exposed-modules: Data.Aeson.Diff , Data.Aeson.Patch , Data.Aeson.Pointer- build-depends: base >=4.9 && <4.14+ build-depends: base >=4.9 && <4.15 , aeson , bytestring >= 0.10 , edit-distance-vector
lib/Data/Aeson/Patch.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-}@@ -26,6 +27,7 @@ import Data.Semigroup (Semigroup) import Data.Vector (Vector) import qualified Data.Vector as V+import GHC.Generics (Generic) import Data.Aeson.Pointer @@ -34,7 +36,7 @@ -- | Describes the changes between two JSON documents. newtype Patch = Patch { patchOperations :: [Operation] }- deriving (Eq, Show, Semigroup, Monoid)+ deriving (Eq, Show, Semigroup, Monoid, Generic) instance ToJSON Patch where toJSON (Patch ops) = toJSON ops@@ -70,7 +72,7 @@ -- ^ http://tools.ietf.org/html/rfc6902#section-4.3 | Tst { changePointer :: Pointer, changeValue :: Value } -- ^ http://tools.ietf.org/html/rfc6902#section-4.6- deriving (Eq, Show)+ deriving (Eq, Show, Generic) instance ToJSON Operation where toJSON (Add p v) = object
lib/Data/Aeson/Pointer.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -- | Description: JSON Pointers as described in RFC 6901.@@ -25,6 +26,7 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Vector as V+import GHC.Generics (Generic) -- * Patch components @@ -32,7 +34,7 @@ data Key = OKey Text -- ^ Traverse a 'Value' with an 'Object' constructor. | AKey Int -- ^ Traverse a 'Value' with an 'Array' constructor.- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show, Generic) instance ToJSON Key where toJSON (OKey t) = String t@@ -64,7 +66,7 @@ -- -- Defined in RFC 6901 <http://tools.ietf.org/html/rfc6901> newtype Pointer = Pointer { pointerPath :: Path }- deriving (Eq, Ord, Show, Semigroup, Monoid)+ deriving (Eq, Ord, Show, Semigroup, Monoid, Generic) -- | Format a 'Pointer' as described in RFC 6901. --