public bool BatchParse(string rawJsonString, ServerData serverdata, int page) { JObject jsonData; string jsonString = rawJsonString.Replace("svdata=", ""); try { jsonData = JObject.Parse(jsonString); JValue jsonResult = (JValue)jsonData["api_result"]; if (Convert.ToInt32(jsonResult.Value) == 1) { IList <JToken> results = jsonData["api_data"]["api_list"].Children().ToList(); foreach (JToken result in results) { ApiSenkaResult apiResult = JsonConvert.DeserializeObject <ApiSenkaResult>(result.ToString()); serverdata.AddData(new SenkaData(apiResult)); } // Save To File File.AppendAllText(serverdata.LogPath, string.Format("api_req_ranking,getlist,\"{0}\"\"\",\r\n", jsonString.Replace("\"\"", new String('\"', 8)))); } else { throw new WebException(jsonString); } } catch (Exception ex) { log.Warn(string.Format("[ServerID {0}] Page {1} Pharing ERROR!", serverdata.ID, page), ex); return(false); } return(true); }