A Command Line wrapper for using the jsondiffpatch library
jsondiffpatch-cli OPERATION A.json B.json OUTPUT.json
It requires the operation name and at least two json file paths. The third path is the output.
- File A: is the left side of the diff
- File B: is the right side of the diff
- Output: where the diff will be stored
jsondiffpatch-cli diff left.json right.json left-right.diff.json
- File A: is the base file to apply the patch (in our example would be the left)
- File B: is the diff file to apply as patch
- Output: the result json after applying the patch
jsondiffpatch-cli patch left.json left-right.diff.json.json output-left.json
- File A: is the base file to apply the patch (in our example would be the right)
- File B: is the diff file to apply as patch
- Output: the result json after applying the patch
jsondiffpatch-cli unpatch right.json left-right.diff.json.json output-right.json
This tool uses the jsondiffpatch library developed by Benjamin Eidelman