aeson-diff-1.1.0.9: Extract and apply patches to JSON documents.

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Patch

Contents

Description

 
Synopsis

Documentation

newtype Patch Source #

Describes the changes between two JSON documents.

Constructors

Patch 
Instances
Eq Patch Source # 
Instance details

Defined in Data.Aeson.Patch

Methods

(==) :: Patch -> Patch -> Bool #

(/=) :: Patch -> Patch -> Bool #

Show Patch Source # 
Instance details

Defined in Data.Aeson.Patch

Methods

showsPrec :: Int -> Patch -> ShowS #

show :: Patch -> String #

showList :: [Patch] -> ShowS #

Generic Patch Source # 
Instance details

Defined in Data.Aeson.Patch

Associated Types

type Rep Patch :: Type -> Type #

Methods

from :: Patch -> Rep Patch x #

to :: Rep Patch x -> Patch #

Semigroup Patch Source # 
Instance details

Defined in Data.Aeson.Patch

Methods

(<>) :: Patch -> Patch -> Patch #

sconcat :: NonEmpty Patch -> Patch #

stimes :: Integral b => b -> Patch -> Patch #

Monoid Patch Source # 
Instance details

Defined in Data.Aeson.Patch

Methods

mempty :: Patch #

mappend :: Patch -> Patch -> Patch #

mconcat :: [Patch] -> Patch #

ToJSON Patch Source # 
Instance details

Defined in Data.Aeson.Patch

FromJSON Patch Source # 
Instance details

Defined in Data.Aeson.Patch

type Rep Patch Source # 
Instance details

Defined in Data.Aeson.Patch

type Rep Patch = D1 (MetaData "Patch" "Data.Aeson.Patch" "aeson-diff-1.1.0.9-361i0zGlNlKELB5hftzYU1" True) (C1 (MetaCons "Patch" PrefixI True) (S1 (MetaSel (Just "patchOperations") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Operation])))

data Operation Source #

An Operation describes the operations which can appear as part of a JSON Patch.

See RFC 6902 Section 4 http://tools.ietf.org/html/rfc6902#section-4.

Instances
Eq Operation Source # 
Instance details

Defined in Data.Aeson.Patch

Show Operation Source # 
Instance details

Defined in Data.Aeson.Patch

Generic Operation Source # 
Instance details

Defined in Data.Aeson.Patch

Associated Types

type Rep Operation :: Type -> Type #

ToJSON Operation Source # 
Instance details

Defined in Data.Aeson.Patch

FromJSON Operation Source # 
Instance details

Defined in Data.Aeson.Patch

type Rep Operation Source # 
Instance details

Defined in Data.Aeson.Patch

Modification

modifyPointer :: (Pointer -> Pointer) -> Operation -> Operation Source #

Modify the Pointers in an Operation.

If the operation contains multiple pointers (i.e. a Mov or Cpy) then both will be modified.

modifyPointers :: (Pointer -> Pointer) -> Patch -> Patch Source #

Modify the pointers in the Operations of a Patch.

See modifyPointer for details.

Predicates