Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Aeson.Diff
Description
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.
- data Patch = Patch {
- patchOperations :: [Operation]
- data Pointer
- data Key
- data Operation
- diff :: Value -> Value -> Patch
- patch :: Patch -> Value -> Result Value
- patch' :: Patch -> Value -> Value
- applyOperation :: Operation -> Value -> Result Value
- formatPatch :: Patch -> Text
Patches
Describes the changes between two JSON documents.
Constructors
Patch | |
Fields
|
Pointer to a location in a JSON document.
Defined in RFC 6901 http://tools.ietf.org/html/rfc6901
An Operation
describes an atomic change to a JSON document.
See RFC 6902 Section 4 http://tools.ietf.org/html/rfc6902#section-4.
Constructors
Add | |
Fields
| |
Rem | |
Fields
| |
Rep | |
Fields
| |
Mov | |
Fields | |
Cpy | |
Fields | |
Tst | |
Fields
|
Functions
diff :: Value -> Value -> Patch Source
Compare two JSON documents and generate a patch describing the differences.