-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Extract and apply patches to JSON documents. -- -- This is a small library for working with changes to JSON documents. It -- includes a library and two command-line executables in the style of -- the diff(1) and patch(1) commands available on many systems. @package aeson-diff @version 0.1.1.3 -- | This module implements data types and operations to represent the -- differences between JSON documents (i.e. a patch), to compare JSON -- documents and extract such a patch, and to apply such a patch to a -- JSON document. module Data.Aeson.Diff -- | Describes the changes between two JSON documents. data Patch Patch :: [Operation] -> Patch [patchOperations] :: Patch -> [Operation] -- | A path through a JSON document is a possibly empty sequence of -- Keys. type Path = [Key] -- | Traverse a single layer of a JSON document. data Key -- | Traverse a Value with an Object constructor. OKey :: Text -> Key -- | Traverse a Value with an Array constructor. AKey :: Int -> Key -- | An Operation describes an atomic change to a JSON document: -- inserting or deleting a single Value at a specific point. data Operation -- | Insert a Value at a location. Ins :: Path -> Value -> Operation [changePath] :: Operation -> Path [changeValue] :: Operation -> Value -- | Delete the Value at a location. Del :: Path -> Value -> Operation [changePath] :: Operation -> Path [changeValue] :: Operation -> Value -- | Compare two JSON documents and generate a patch describing the -- differences. diff :: Value -> Value -> Patch -- | Apply a patch to a JSON document. patch :: Patch -> Value -> Value -- | Apply an Operation to a Value. applyOperation :: Operation -> Value -> Value -- | Format a Patch for reading by humans. -- -- For storing or exchanging Patches between systems using the -- JSON encoding implemented by the FromJSON and ToJSON -- instances. formatPatch :: Patch -> Text instance GHC.Classes.Eq Data.Aeson.Diff.Patch instance GHC.Show.Show Data.Aeson.Diff.Operation instance GHC.Classes.Eq Data.Aeson.Diff.Operation instance GHC.Show.Show Data.Aeson.Diff.Key instance GHC.Classes.Ord Data.Aeson.Diff.Key instance GHC.Classes.Eq Data.Aeson.Diff.Key instance GHC.Show.Show Data.Aeson.Diff.Patch instance GHC.Base.Monoid Data.Aeson.Diff.Patch instance Data.Aeson.Types.Class.ToJSON Data.Aeson.Diff.Patch instance Data.Aeson.Types.Class.FromJSON Data.Aeson.Diff.Patch instance Data.Aeson.Types.Class.ToJSON Data.Aeson.Diff.Operation instance Data.Aeson.Types.Class.FromJSON Data.Aeson.Diff.Operation instance Data.Aeson.Types.Class.ToJSON Data.Aeson.Diff.Key instance Data.Aeson.Types.Class.FromJSON Data.Aeson.Diff.Key