@Test public void shouldOptionallyIncludeListChildFields() { Order order = new Order(new Client("guilherme silveira"), 15.0, "pack it nicely, please", new Item("any item", 12.99)); serialization.from(order).include("items").serialize(); assertThat(result(), containsString("\"items\"")); assertThat(result(), containsString("\"name\": \"any item\"")); assertThat(result(), containsString("\"price\": 12.99")); }
public <T> Serializer from(T object) { return from(object, null); }
XStreamJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } }
XStreamJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } XStreamJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); }
XStreamJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } XStreamJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); NoRootSerialization withoutRoot(); JSONSerialization indented(); }
XStreamJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } XStreamJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); NoRootSerialization withoutRoot(); JSONSerialization indented();  }