skip to Main Content

Deserializing JSON (without dynamic) where array has multiple possible depths based on value of another property?

I am trying to deserialize the following JSON without using dynamic as it is not supported by my system: https://raw.githubusercontent.com/vansha/Two10.CountryLookup/master/Two10.CountryLookup/region-list.json Each line presents a region for geolocating with. Using the JSON Converter here: https://json2csharp.com/ I get the suggestion for data…

VIEW QUESTION

Visual Studio Code – Exception is always thrown by httpClient.PostAsync. I can temporarily get past it with ConfigureAwait(false) but I can't avoid an exception completely

I am doing Async and Await with C# ASP.Net MVC, with Target .Net Framework 4.8 using Visual Studio 2022. So no matter what, I always get an exception when I call httpClient.PostAsync(...). I can call httpClient.PostAsync(...).ConfigureAwait(false) which doesn't give me…

VIEW QUESTION

C# RestSharp JSON Syntax

I seem to have a syntax problem with my JSON body. The code is intended to retrieve the balance from LetterXpress using an API, but instead of being able to authenticate, I receive the response: ("{"message":"Unauthorized."}") The request works fine…

VIEW QUESTION
Back To Top
Search