C#解析Json
public class TransportUtility { public static OuterClass GetTransportWeb(string actionName, string json) { var serverUrl = "http://42.121.253.250:800/api/yanwen"; var client = new WebClient { Encoding = Encoding.UTF8 }; client.Headers.Add("Content-Type", "Application/json; charset=utf-8"); client.Headers.Add("Provider-Name", "winit"); client.Headers.Add("Action-Name", actionName); var jsonData = client.UploadString(serverUrl, json); var ser = new JavaScriptSerializer(); return ser.Deserialize<OuterClass>(jsonData); } } public class OuterClass { public bool HasError; public string ErrorMessage; public string Data; }