Read a JSON Data stream from the Internet, and display it in a C# Razor Page web page. In this video, I start with a JSON endpoint. I put the JSON data into a JSON viewer to visualize it, and then into QuickType.io to generate C# client code. I paste the C# client code into a Visual Studio 2022 project. I integrate it in a cshtml.cs file, by using HttpClient to call the API endpoint and retrieve the data as a String. I use the QuickType client to convert the string to a series of objects. I add the objects to a List, and then pass that list to the .cshtml page to display them. I iterate over the list, and show the results in an HTML table. Finally, I debug through the entire application, so that we can watch it all at its own pace. The source code from this video is freely available on GitHub at :
Watch video Show data from a RESTful JSON API in a C# Razor Page web page with Visual Studio 2022 online without registration, duration 17 minute 11 second in high hd quality. This video was added by user Brandan Jones 09 September 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3 thousand once and liked it 42 people.