© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
3 replies
_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"
  },
  /*...*/
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Deserialize JSON back into custom object
C#CC# / help
17mo ago
Deserialize JSON to dynamic object without Newtonsoft.Json
C#CC# / help
4y ago