added new json-related methods to ApiTestCase; some minor fixes