string json = "{\"orderId\":\"000001\",\"haha\":\"001\",\"测试\":\"003\",\"goodsId[10]\":\"new data\"}";
            JObject jsonObj = JsonConvert.DeserializeObject(json) as JObject;
            foreach (var p in jsonObj.Properties().ToArray())
                Console.WriteLine("key={0}, value={1}", p.Name, jsonObj[p.Name].Value<string>());
            //{
            //"orderId":"000001",
            //"haha":"001",
            //"测试":"003",
            //"goodsId[10]":"new data",
        //}

 

posted on 2018-10-29 17:32  红磨坊后的白桦树  阅读(1390)  评论(0编辑  收藏  举报