@Test public void testToJson() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); json(new Hello("world")).writeTo(out); String s = new String(out.toByteArray()); assertThat(s, equalTo("{\"name\":\"world\"}")); }
public static <T> BodyReader<T> json(Class<T> type) { return INSTANCE.reader(type); }
GsonMapper { public static <T> BodyReader<T> json(Class<T> type) { return INSTANCE.reader(type); } }
GsonMapper { public static <T> BodyReader<T> json(Class<T> type) { return INSTANCE.reader(type); } GsonMapper(Gson gson); }
GsonMapper { public static <T> BodyReader<T> json(Class<T> type) { return INSTANCE.reader(type); } GsonMapper(Gson gson); static BodyReader<T> json(Class<T> type); static BodyWriter json(Object value); BodyReader<T> reader(Class<T> type); BodyWriter writer(Object value); }
GsonMapper { public static <T> BodyReader<T> json(Class<T> type) { return INSTANCE.reader(type); } GsonMapper(Gson gson); static BodyReader<T> json(Class<T> type); static BodyWriter json(Object value); BodyReader<T> reader(Class<T> type); BodyWriter writer(Object value);  }