Add JSON output.

JSON output is useful if you want to parse weighttp's output and feed it into a program that will, say, plot the results.