-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Extract and apply patches to JSON documents. -- @package aeson-diff @version 0.1.1.1 -- | 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 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 OKey :: Text -> Key AKey :: Int -> Key -- | Descripts an atomic change to a JSON document. 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. formatPatch :: Patch -> Text instance Eq Key instance Ord Key instance Show Key instance Eq Operation instance Show Operation instance Eq Patch instance FromJSON Key instance ToJSON Key instance FromJSON Operation instance ToJSON Operation instance FromJSON Patch instance ToJSON Patch instance Monoid Patch instance Show Patch