@Test public void serializeObject() throws Exception { assertEquals("JSON representation of object model is different than expected", DEFAULT_VALUE, test.toJSON(PARENT)); }
public String toJSON(T value) throws IOException { Writer writer = new StringWriter(); toJSON(writer, value); return writer.toString(); }
AbstractJsonTranslator { public String toJSON(T value) throws IOException { Writer writer = new StringWriter(); toJSON(writer, value); return writer.toString(); } }
AbstractJsonTranslator { public String toJSON(T value) throws IOException { Writer writer = new StringWriter(); toJSON(writer, value); return writer.toString(); } AbstractJsonTranslator(Class<? extends AbstractJsonTranslator<?>> subclass); }
AbstractJsonTranslator { public String toJSON(T value) throws IOException { Writer writer = new StringWriter(); toJSON(writer, value); return writer.toString(); } AbstractJsonTranslator(Class<? extends AbstractJsonTranslator<?>> subclass); T fromJSON(String json); @SuppressWarnings("unchecked") T fromJSON(Reader reader); String toJSON(T value); void toJSON(Writer writer, T value); void usePrettyPrinter(); void disablePrettyPrint(); }
AbstractJsonTranslator { public String toJSON(T value) throws IOException { Writer writer = new StringWriter(); toJSON(writer, value); return writer.toString(); } AbstractJsonTranslator(Class<? extends AbstractJsonTranslator<?>> subclass); T fromJSON(String json); @SuppressWarnings("unchecked") T fromJSON(Reader reader); String toJSON(T value); void toJSON(Writer writer, T value); void usePrettyPrinter(); void disablePrettyPrint();  }