Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Aeson.Patch
Contents
Description
Synopsis
- newtype Patch = Patch {
- patchOperations :: [Operation]
- data Operation
- modifyPointer :: (Pointer -> Pointer) -> Operation -> Operation
- modifyPointers :: (Pointer -> Pointer) -> Patch -> Patch
- isAdd :: Operation -> Bool
- isRem :: Operation -> Bool
- isRep :: Operation -> Bool
- isMov :: Operation -> Bool
- isCpy :: Operation -> Bool
- isTst :: Operation -> Bool
Documentation
Describes the changes between two JSON documents.
Constructors
Patch | |
Fields
|
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.
Constructors
Add | |
Fields
| |
Cpy | |
Fields | |
Mov | |
Fields | |
Rem | |
Fields | |
Rep | |
Fields
| |
Tst | |
Fields
|
Instances
Eq Operation Source # | |
Show Operation Source # | |
Generic Operation Source # | |
ToJSON Operation Source # | |
FromJSON Operation Source # | |
type Rep Operation Source # | |
Defined in Data.Aeson.Patch type Rep Operation = D1 ('MetaData "Operation" "Data.Aeson.Patch" "aeson-diff-1.1.0.9-DUZGodBXCsLh9eOIt8C0b" 'False) ((C1 ('MetaCons "Add" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer) :*: S1 ('MetaSel ('Just "changeValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: (C1 ('MetaCons "Cpy" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer) :*: S1 ('MetaSel ('Just "fromPointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer)) :+: C1 ('MetaCons "Mov" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer) :*: S1 ('MetaSel ('Just "fromPointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer)))) :+: (C1 ('MetaCons "Rem" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer)) :+: (C1 ('MetaCons "Rep" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer) :*: S1 ('MetaSel ('Just "changeValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: C1 ('MetaCons "Tst" 'PrefixI 'True) (S1 ('MetaSel ('Just "changePointer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pointer) :*: S1 ('MetaSel ('Just "changeValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value))))) |
Modification
modifyPointers :: (Pointer -> Pointer) -> Patch -> Patch Source #
Modify the pointers in the Operation
s of a Patch
.
See modifyPointer
for details.