Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialcaitlinsheeks
5,423 PointsEverything is out of date! I can't figure out how to get JSON info deserialized
All of the links for this course are out of date. The way that Carling shows us how to do things is out of date. I go to documentation for WebClient and it says not to use WebClient any more, just as an example. I've spent so much time searching for a way to do this using what documentation says to use and I can't figure it out. It's really ridiculous how out of date this course is.
I don't even know where to go from here. My code is nothing like what Carling had now, and it still doesn't work.
I've been trying to use HttpClient, as Microsoft's docs said to use, but I just don't know what I'm doing.
Please drops some hints as to where I should look. I don't mind doing research. I know that's a huge part of coding and I'm used to it. Unfortunately, I'm out of ideas.
1 Answer
Christian Loveridge
3,063 PointsUnfortunately, the video only gives an idea of what to look for, but you'll have to just focus on the concepts rather than step-by-step instructions. I made the request and just stored the JSON response in a string and then copy it to "paste JSON into a new class" and went from there. Microsoft has an example on their page of how to do it with the HttpClient() method, so that's no longer an issue (in 2023 at least)
I also have cheated a bit through this course and used ChatGPT AI to troubleshoot issues because it's so good at explaining things that get skimmed over in this course, but the hard truth is that this is what it's going to be like as a dev -- a lot of time spent digging through docs, then doing trial and error to figure out what you don't already know.
Anyone else stuck here, good luck! You got this!