publicstaticStringjson2xml(StringjsonString){XMLSerializerxmlSerializer=newXMLSerializer();returnxmlSerializer.write(JSONSerializer.toJSON(jsonString));//returnxmlSerializer.write(JSONArray.fromObject(jsonString));//这种方式只支持JSON数组}