I'm working on a small project in C# using Json. I have some troubles understanding Json and C#, i think i got my Json Data format wrong but im not sure.'
Let me show you:
{
"response": {
"success": 1,
"current_time": 1388791039,
"players": {
"0": {
"steamid": "4235647457865",
"success": 1,
"backpack_value": 1,
"backpack_update": 1,
"name": "Test",
"notifications": 0
}
}
}
- Json Format i recieve.
public class Player
{
public string steamid { get; set; }
public int success { get; set; }
public double backpack_value { get; set; }
public int backpack_update { get; set; }
public string name { get; set; }
public int stats_tf_reputation { get; set; }
public int stats_tf_supporter { get; set; }
public bool steamrep_scammer { get; set; }
public bool ban_economy { get; set; }
}
public class Response
{
public int success { get; set; }
public int current_time { get; set; }
public List<Player> players { get; set; }
}
public class JsonData
{
public Response response { get; set; }
}
- The data format class i created.
I guess it goes horribly wrong with the ""0": {" part. I tried a few different ways but i cant fix it.
I hope someone can help me out!