日期:2014-05-18 浏览次数:20896 次
string str = "{\"fcode\":\"10\",\"fno\":\"009999\",\"fmemo\":\"009999-4\"}"; Dictionary<string, object> dd = str.Trim(new char[] { '{', '}' }).Split(',') .ToDictionary(s => s.Split(':')[0].Trim('"'), s => (object)s.Split(':')[1].Trim('"')); Console.WriteLine(dd["fcode"]);