62,046
社区成员
发帖
与我相关
我的任务
分享
string jsonstr = "{\"NICK_NAME\":\"flyso\",{\"CMDNO\":\"21\",\"REAL_NAME\":\"songsong\",\"GENDER\":\"M\",\"ROLE\":\"1\",\"MOBILE\":\"13900000002\",\"PASSWORD\":\"123456\"}";
jsonstr = jsonstr.Replace("""", "").Replace("'", "").Replace("{", "").Replace("}", "")
Hashtable ht = new Hashtable();
for (int i = 0; i < jsonstr.Split(',').Length;i ++ )
{
string str = jsonstr.Split(',')[i].ToString().Trim();
ht.Add(str.Split(':')[0], str.Split(':')[1]);
}
Hashtable hs = JsonConvert.DeserializeObject<Hashtable>("{\"NICK_NAME\":\"flyso\",\"CMDNO\":\"21\",\"REAL_NAME\":\"songsong\",\"GENDER\":\"M\",\"ROLE\":\"1\",\"MOBILE\":\"13900000002\",\"PASSWORD\":\"123456\"}");