Bilnord
Bilnord
CC#
Created by Bilnord on 1/30/2023 in #help
Newtonsoft .NET Deserialization
Hey, I would like to deserialize JSON string but I'm actually out of ideas. I have tried JToken to do it by path but it was failure for me. It's complicated for me because in the items_list objects starts with item name and I just can not make class to deserialize the json as far as I know. I suppose that there is easy way to do it but I do not have that much knowledge in JSON. Here's my JSON example. Appreciate any ideas/help.
{
"success": true,
"currency": "USD",
"timestamp": 1674493571,
"items_list": {
"&#39Blueberries&#39 Buckshot | NSWC SEAL": {
"name": "&#39Blueberries&#39 Buckshot | NSWC SEAL",
"marketable": 1,
"tradable": 1,
"classid": "4114517977",
"icon_url": "----",
"icon_url_large": null,
"type": null,
"rarity": "Exceptional",
"rarity_color": "8847ff",
"price": {
"7_days": {
"average": 3.19,
"median": 3.18,
"sold": "289",
"standard_deviation": "12.46",
"lowest_price": 0.99,
"highest_price": 3.61
},
"30_days": {
"average": 2.84,
"median": 2.8,
"sold": "2835",
"standard_deviation": "11.32",
"lowest_price": 0.99,
"highest_price": 3.61
},
"all_time": {
"average": 1.41,
"median": 2.38,
"sold": "157819",
"standard_deviation": "51.15",
"lowest_price": 0.83,
"highest_price": 3.61
}
},
"first_sale_date": "1607036400"
}
}
}
{
"success": true,
"currency": "USD",
"timestamp": 1674493571,
"items_list": {
"&#39Blueberries&#39 Buckshot | NSWC SEAL": {
"name": "&#39Blueberries&#39 Buckshot | NSWC SEAL",
"marketable": 1,
"tradable": 1,
"classid": "4114517977",
"icon_url": "----",
"icon_url_large": null,
"type": null,
"rarity": "Exceptional",
"rarity_color": "8847ff",
"price": {
"7_days": {
"average": 3.19,
"median": 3.18,
"sold": "289",
"standard_deviation": "12.46",
"lowest_price": 0.99,
"highest_price": 3.61
},
"30_days": {
"average": 2.84,
"median": 2.8,
"sold": "2835",
"standard_deviation": "11.32",
"lowest_price": 0.99,
"highest_price": 3.61
},
"all_time": {
"average": 1.41,
"median": 2.38,
"sold": "157819",
"standard_deviation": "51.15",
"lowest_price": 0.83,
"highest_price": 3.61
}
},
"first_sale_date": "1607036400"
}
}
}
37 replies