c# json key转大小写

有需求需要将json的字段转换为小写,使用正则表达式实现,代码如下

正则表达式为   "[a-zA-Z0-9]+"s*:

               MatchCollection ms = Regex.Matches(strJsonData, "\"[a-zA-Z0-9]+\"\s*:");
                foreach ( Match item in ms)
                {
                    strJsonData.Replace(item.Value, item.Value.ToLower());
                }  
原文地址:https://www.cnblogs.com/bfyx/p/6931935.html