java XML equivalent to flexjson.JSONDeserializer and flexjson.JSONSerializer

iyobo

New Member
I have some Java code that is using flexjson.JSONDeserializer and flexjson.JSONSerializer. (simply speaking JSONDeserializer creates an class instance using property value pairs from a String of JSON and JSONSerializer takes a class instance and creates a String of JSON.)And now I have a need to also use something similar for XML, what is the best match and is there something similar but that has better performance?simple example\[code\]class X { private Integer a; public void setA(Integer a); public Integer getA(); }with json equal to {"a":1} I have the followingnew JSONDeserializer<X>().use(null, X.class).deserialize(json);with json equal to [{"a":1},{"a":2}]new JSONDeserializer<List<X>>().use(null, ArrayList.class).use("values", X.class).deserialize(json);\[/code\]
 
Back
Top