What am I doing wrong with this deserialized data?
When I run my program i'm only getting nulls and zero's when trying to access card prices from the json provided. Anyone have an idea on what I did wrong in my code?
Json Used
https://db.ygoprodeck.com/api/v7/cardinfo.php?name=Tornado%Dragon
(reposted my question with less clutter)
5 Replies
well cardmarket_price isnt on the root of the json, if you deserialized right, you access it like this
Convert JSON to C# Classes Online - Json2CSharp Toolkit
Convert any JSON object to C# classes online. Json2CSharp is a free toolkit that will help you generate C# classes on the fly.
That worked, had no clue it had to be typed down that way (or why [0] is needed).
because data and card_prices are arrays
i see i see thanks, now to see if i can find more information about this. 🙂