@Test public void shouldSerializeCalendarLikeXstream() { GsonJSONSerialization serialization = serializationWithAdapter(new CalendarSerializer()); Client c = new Client("renan"); c.included = new GregorianCalendar(2012, 8, 3); serialization.from(c).serialize(); String result = result(); String expectedResult = "{\"client\":{\"name\":\"renan\",\"included\":{\"time\":\"" + c.included.getTimeInMillis() + "\",\"timezone\":\"" + c.included.getTimeZone().getID() + "\"}}}"; assertThat(result, is(equalTo(expectedResult))); }
public <T> Serializer from(T object) { return from(object, null); }
GsonJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } }
GsonJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } GsonJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor,
			ProxyInitializer initializer, VRaptorGsonBuilder builder, Serializee serializee); }
GsonJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } GsonJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor,
			ProxyInitializer initializer, VRaptorGsonBuilder builder, Serializee serializee); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); NoRootSerialization withoutRoot(); JSONSerialization indented(); }
GsonJSONSerialization implements JSONSerialization { public <T> Serializer from(T object) { return from(object, null); } GsonJSONSerialization(HttpServletResponse response, TypeNameExtractor extractor,
			ProxyInitializer initializer, VRaptorGsonBuilder builder, Serializee serializee); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); NoRootSerialization withoutRoot(); JSONSerialization indented();  }