use of br.com.caelum.vraptor.interceptor.DefaultTypeNameExtractor in project restfulie-java by caelum.
the class MyCollectionConverter method main.
public static void main(String[] args) {
JSONSerializationCustomized ser = new JSONSerializationCustomized(null, new DefaultTypeNameExtractor(), null);
XStream xstream = ser.getXStream();
List l = new ArrayList();
l.add(new Item("a", "b"));
l.add(new Item("d", "c"));
System.out.println(xstream.toXML(l));
List l2 = (List) xstream.fromXML(xstream.toXML(l));
System.out.println(l2);
}
Aggregations