JSON反序列化实体

paydata = StringHelper.Base64ToString(paydata);
resInfo = JsonConvert.DeserializeObject<RequestInfo>(paydata);

XMl反序列化实体

paydata = StringHelper.Base64ToString(paydata);
using (StringReader sr = new StringReader(paydata))
{

XmlSerializer xmlSerializer = string.IsNullOrWhiteSpace("xml") ?

new XmlSerializer(typeof(RequestInfo)) : new XmlSerializer(typeof(RequestInfo), new XmlRootAttribute("xml"));

resInfo = (RequestInfo)xmlSerializer.Deserialize(sr);
}

05-11 19:57