XStream xx = new XStream(new JsonHierarchicalStreamDriver(){ public HierarchicalStreamWriter createWriter(Writer writer) { return new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE); } }); System.out.println(xx.toXML(metric));
本文出自 “edison” 博客,请务必保留此出处http://edisonxing.blog.51cto.com/8663867/1714708
原文地址:http://edisonxing.blog.51cto.com/8663867/1714708