+ "\"rows\":[{\"c\":[{\"v\":\"aaa\"},{\"v\":222.0,\"f\":\"222\"},{\"v\":false}]},"
+ "{\"c\":[{\"v\":\"\"},{\"v\":111.0},{\"v\":true}]},"
+ "{\"c\":[{\"v\":\"bbb\"},{\"v\":333.0},{\"v\":true}]},"
+ "{\"c\":[{\"v\":\"ddd\"},{\"v\":222.0},{\"v\":false}]}]}}";
assertEquals(expected, new JsonRenderer().render(new DataSourceRequest(
new DataSourceParameters("responseHandler:babylon;out:json")
), this.getTestDataTable()).toString());
// Basic test 2.
expected = "{\"version\":\"0.6\",\"reqId\":\"90210\",\"status\":\"ok\","
+ "\"sig\":\"2087475733\",\"table\":"
+ "{\"cols\":[{\"id\":\"A\",\"label\":\"col0\",\"type\":\"string\",\"pattern\":\"\"},"
+ "{\"id\":\"B\",\"label\":\"col1\",\"type\":\"number\",\"pattern\":\"\"},"
+ "{\"id\":\"C\",\"label\":\"col2\",\"type\":\"boolean\",\"pattern\":\"\"}],"
+ "\"rows\":[{\"c\":[{\"v\":\"aaa\"},{\"v\":222.0,\"f\":\"222\"},{\"v\":false}]},"
+ "{\"c\":[{\"v\":\"\"},{\"v\":111.0},{\"v\":true}]},"
+ "{\"c\":[{\"v\":\"bbb\"},{\"v\":333.0},{\"v\":true}]},"
+ "{\"c\":[{\"v\":\"ddd\"},{\"v\":222.0},{\"v\":false}]}]}}";
assertEquals(expected, new JsonRenderer().render(new DataSourceRequest(
new DataSourceParameters("reqId:90210;responseHandler:babylon;")
), this.getTestDataTable()).toString());
}