I am helpless, I need deserialize JSON string in this format to class.
JSON string:
{
"newNickInfo": {
"2775040": {
"idUser": 2775040,
"nick": "minci88",
"sefNick": "minci88",
"sex": 2,
"photon": "http:\/\/213.215.107.125\/fotky\/277\/50\/n_2775040.jpg?v=4",
"photos": "http:\/\/213.215.107.125\/fotky\/277\/50\/s_2775040.jpg?v=4",
"logged": false,
"idChat": 0,
"roomName": "",
"updated": 1289670130
}
}
}
Class:
public class User
{
public string idUser { get; set; }
public string nick { get; set; }
public string sefNick { get; set; }
public string sex { get; set; }
public string photon { get; set; }
public string photos { get; set; }
public bool logged { get; set; }
public int idChat { get; set; }
public string roomName { get; set; }
public string updated { get; set; }
}
First problem is, class properties must be lower case, and second problem is I try many ways but I don’t know how cut json object from this json string and deserialize in class. Any ides? Thank for any help.
One more question, what format would have c# class, if I want deserialize this json string into it.