© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
Navi

Json array with multiple types to object

Hi,
I've got the following JSON Array of an array (that I can't change)
"values": [
    [
        "2712",
        1
    ],
    [
        "2.40",
        1
    ]
],
"values": [
    [
        "2712",
        1
    ],
    [
        "2.40",
        1
    ]
],


How would I go about deserializing this using system.text.json?

I'm fine with a solution that gives me a class (with a string and int as properties) or with casting the int to a string somehow and thus having an
string[][]
string[][]
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

❔ sending multiple object json via API
C#CC# / help
3y ago
❔ JSON array to List KeyValuePair with Newtonsoft.JSON?
C#CC# / help
4y ago
✅ object types?
C#CC# / help
3y ago
❔ deserialize json object which should be an array
C#CC# / help
4y ago