Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
webdemo/ | H | 03-May-2022 | - | |||
.atom-build.json | H A D | 15-May-2020 | 368 | |||
.gitignore | H A D | 15-May-2020 | 44 | |||
LICENSE | H A D | 15-May-2020 | 1 KiB | |||
README.md | H A D | 15-May-2020 | 1 KiB | |||
jsondiff.go | H A D | 15-May-2020 | 9.2 KiB | |||
jsondiff_test.go | H A D | 15-May-2020 | 1 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