JsonConverterJEE implements JsonConverter { @Override public String prettyPrint(String json) { return toRpcJson(json); }  @Override void addAdapter(Type type, Object adapter); @Override JsonConverterJEE configure(Properties properties); @Override RpcErrorResponse errorFromJson(String json); @Override RpcResponse<T> responseFromJson(String json, Class<T> resultClass); @Override T fromJson(String json, Class<T> resultClass); @Override String prettyPrint(String json); @Override String toRpcJson(Object input); @Override String toGenericJson(Object object, Type runtimeType); @Override String getName(); static final String NAME; }
@Test @Ignore("Pretty print with string doesn't seem to work in json-p") public void testPrettyPrint() { String json = CONV.prettyPrint("{\"three\": \"lines\"}"); Assert.assertEquals( "{\n" + " \"three\": \"lines\"\n" + "}", json); Properties properties = new Properties(); properties.setProperty("json.prettyprint", "false"); properties.setProperty("json.lenient", "false"); CONV.configure(properties); json = CONV.prettyPrint("{three:lines}"); properties.clear(); CONV.configure(null); Assert.assertEquals( "{\n" + " \"three\": \"lines\"\n" + "}", json); }