how to serialize generic type java code example

how to serialize generic type java

1

1 Example

0
XStream xstream = new XStream();
Generic<T> generic = ...;//whatever needed
String xml = xstream.toXML(generic);
//write it to a file (or use xstream directly to write it to a file)

Other Code Examples