Safe Haskell | None |
---|---|
Language | Haskell2010 |
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]
- type Path = [Key]
- data Key
- data Operation
- = Ins {
- changePath :: Path
- changeValue :: Value
- | Del {
- changePath :: Path
- changeValue :: Value
- = Ins {
- diff :: Value -> Value -> Patch
- patch :: Patch -> Value -> Value
- applyOperation :: Operation -> Value -> Value
- formatPatch :: Patch -> Text
Patches
Describes the changes between two JSON documents.
An Operation
describes an atomic change to a JSON document: inserting or
deleting a single Value
at a specific point.
Ins | Insert a |
| |
Del | Delete the |
|