Have a program that calls up a URL of JSON data and loads it in and then starts processing it record by record. That said, sometimes the result can be just a header with no data for various reasons. When I try to process the results I end up getting the below due to no data:
- Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
- at ShowWebsiteDownloader.Program.Main() in C:\Users\jriker\source\repos\ShowWebsiteDownloader\ShowWebsiteDownloader\Program.cs:line 97
- rawJSON = webClient.DownloadString(showsurls);
- ShowWebsiteDownloader.Rootobject rootObject = JsonConvert.DeserializeObject
(rawJSON);
Then process the results
- for (int loop = 0; loop < rootObject.tiles.Length; loop++)
- {
John RikerPosted Dec 10, 2020, 10:32 AM
Jaimin ShethiyaPosted Dec 3, 2020, 11:46 PM
can you please tried the below code and checked.
Thanks
Rajanikant HawaldarPosted Dec 1, 2020, 4:37 AM
Sachin SinghPosted Dec 1, 2020, 4:35 AM