Various improvements to the JSON code and test reporting bits

I'm pretty sure we'd have to do the parsing ourselves, but I'll play around a bit and see if there is a good framework-neutral way to break things apart.