我有这个 JSON 字符串:
{"natalia1891":{"idUser":1435105,"nick":"natalia1891","sefNick":"natalia1891","status":1,"photo":"http:\/\/213.215.107.125\/ fotky\/143\/51\/s_1435105.jpg?v=3","sex":2,"isFriend":1},
"pepina888":{"idUser":3338870,"nick":"pepina888","sefNick":"pepina888","status":1,"photo":"http:\/\/213.215.107.127\/fotky \/333\/88\/s_3338870.jpg?v=9","sex":2,"isFriend":1}}
我想将此 JSON 反序列化为对象 Friend 的字典。有什么建议吗?
也许:
class Friend{
public string Name{get;set;}
public string IdUser{get;set;}
public string SefNick{get;set;}
public bool Status{get;set;}
public string Url{get;set;}
public int Sex{get;set;}
public bool isFriend{get;set;}
}