Started to upgrade tests -- unfortunately, quite a lot of the testing environment has changed, so it would take a lot of rewriting to get the tests to work again, I think.
Support json format.