C
C#3y ago
_moare

❔ deserialize json object which should be an array

Hi, how can i deserialize a json-string like this, if i dont know how many "items" (item0, item1, item2) are there. If it would be an array, it would be no problem, but sadly it isn't. c#, .net7
{
"item0": {
"name": "Name1"
},
"item1": {
"name": "Name2"
},
"item2": {
"name": "Name3"
},
/*...*/
}
{
"item0": {
"name": "Name1"
},
"item1": {
"name": "Name2"
},
"item2": {
"name": "Name3"
},
/*...*/
}
3 Replies
ero
ero3y ago
dictionary
_moare
_moareOP3y ago
damnnnnn... i am stupid, thanks!!!!
Accord
Accord3y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server