Skip to content

Commit 8aac58c

Browse files
committed
Initial version.
0 parents  commit 8aac58c

File tree

10 files changed

+2106
-0
lines changed

10 files changed

+2106
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Node
2+
/node_modules/
3+
4+
# JetBrains
5+
/.idea/
6+
7+
# Elm
8+
/elm-stuff/
9+
docs.json
10+

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# elm-json-diff
2+
3+
Compute JSON patches by comparing two JSON values.
4+
5+
## Usage
6+
7+
patch =
8+
Json.Diff.diff oldDocument newDocument
9+
10+
Creating a patch has to be done on the `Value` type, due to the type system (records can't be accessed by field name in
11+
Elm).
12+
13+
However, if you have an encoder for your Elm type, you can create a patch by encoding the data first.

elm.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"type": "package",
3+
"name": "lattyware/elm-json-diff",
4+
"summary": "Compute JSON patches by comparing two JSON values.",
5+
"license": "BSD-3-Clause",
6+
"version": "1.0.0",
7+
"exposed-modules": [
8+
"Json.Diff",
9+
"Json.Patch.Invertible"
10+
],
11+
"elm-version": "0.19.0 <= v <= 0.20.0",
12+
"dependencies": {
13+
"elm/core": "1.0.4 <= v < 2.0.0",
14+
"elm/json": "1.1.3 <= v < 2.0.0",
15+
"norpan/elm-json-patch": "1.0.1 <= v < 2.0.0"
16+
},
17+
"test-dependencies": {
18+
"elm-explorations/test": "1.2.2 <= v < 2.0.0"
19+
}
20+
}

0 commit comments

Comments
 (0)