/// <summary> /// 处理json字符串,将[]{}'"字符去除 /// </summary> /// <param name="JsonStr">需处理的字符串</param> /// <returns>处理后的字符串</returns> public static string DealJsonStr(string JsonStr) { Regex regex = new Regex(@"[\]\[\}\{""\']+"); Match match = null; while ((match = regex.Match(JsonStr)).Success) { JsonStr = JsonStr.Replace(match.Value, string.Empty); } return JsonStr; }