Add a bit of more intelligent formatting to JSON output

There's no way to make everyone happy, but some things can be
standardized a bit.

e.g. having Refs on a single line makes a lot of sense.

Signed-off-by: Evan Owen <kainosnoema@gmail.com>