• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

webdemo/H03-May-2022-

.atom-build.jsonH A D15-May-2020368

.gitignoreH A D15-May-202044

LICENSEH A D15-May-20201 KiB

README.mdH A D15-May-20201 KiB

jsondiff.goH A D15-May-20209.2 KiB

jsondiff_test.goH A D15-May-20201 KiB

README.md

1# JsonDiff library
2
3The main purpose of the library is integration into tests which use json and providing human-readable output of test results.
4
5The lib can compare two json items and return a detailed report of the comparison.
6
7At the moment it can detect a couple of types of differences:
8
9 - FullMatch - means items are identical.
10 - SupersetMatch - means first item is a superset of a second item.
11 - NoMatch - means objects are different.
12
13Being a superset means that every object and array which don't match completely in a second item must be a subset of a first item. For example:
14
15```json
16{"a": 1, "b": 2, "c": 3}
17```
18
19Is a superset of (or second item is a subset of a first one):
20
21```json
22{"a": 1, "c": 3}
23```
24
25Library API documentation can be found on godoc.org: https://godoc.org/github.com/nsf/jsondiff
26
27You can try **LIVE** version here (thanks to [gopherjs](https://github.com/gopherjs/gopherjs)): https://nosmileface.dev/jsondiff
28
29The library is inspired by http://tlrobinson.net/projects/javascript-fun/jsondiff/
30