json output format is somewhat unstable, guard in tests

The correct solution is to interrogate the binary output stream, or make a
tabular format for representing it.