.TH pdiffjson 1 "April 2020" "0.3.0" "" .SH NAME pdiffjson \- diff JSON the easy way .SH SYNOPSIS pdiffjson [--sort-arrays] [diff options] file1.json file2.json .SH DESCRIPTION Show pretty-printed, colored diff of normalized JSON. Uses less to paginate the output. Allows a readable diff of any JSON, ignoring all non-semantic differences of whitespace and key ordering. Fields of each object are output with the keys in sorted order prior to calling diff, so insignificant differences of key order are ignored. The --sort-arrays option also enables recursive sorting of all array values, so all differences in ordering within arrays are ignored. This is a "semi-structural diff", meaning it shows only structural (semantic) changes but the diff is shown syntactically on JSON output, which actually makes it more readable and flexible than a true structural diff. Works on large files since it relies only on diff and jq. By default calls diff without arguments, yielding a unified diff. But it can be helpful to add standard diff arguments to refine the type of output, such as: -c (contextual diff), -C2 (contextual diff with two lines of context), or -U5 (unified diff with 5 lines of context). .SH OPTIONS Options are the same as diff(1). .SH SEE ALSO diff(1), colordiff(1), less(1), jq .SH AUTHOR Joshua Levy (joshua@cal.berkeley.edu)