I have a simple JSON reading class that should grab values from a JSON object and put it in c# variables. Right now it uses 8 if statements, but I was wondering
I'm trying to deserialize some json that looks like this { "id":"2021", "descriptions_bg":[ "30231300", "30233160", "32420000", "3
I am using ASP.Net core 5.0 and want to return IEnumerable of an object as Action method response. Here is the response class: public class TestResponse { p
I have implemented the answer from this (rather old) question https://stackoverflow.com/a/31732029/4180176 but it doesn't seem to work for me and I can't figure
I have an enum declared in c#. I have a Display Name/ EnumMember value annotation and Student Class. I'm using asp.net core 2.2+ version with Odata. [DataContra
I want to add a JProperty field in a JObject based on the result of a conditional statement, but I'm having trouble formatting the code. string zip = "00000";
What I am aiming to do is send JSON containing a header object and a compressed data in a field that is byte array. [JsonObject(MemberSerialization.OptOut)] pub
I got the following error while trying to add an object of type class to the JArray. Could not determine JSON object type for type "Class" Here is my code: pr
I have this class hierarchy : public class ProxyBotsSnapshotLogEntryDetails : IBotsSnapshotLogEntryDetails { public ICollection<IBotSnapshot> Snapsho
I am calling a REST endpoint from C# and I am receiving json which gets serialized into an object. One of the properties on this object is a dynamic property. T
I have a GitHub action doing .net solution build, test and deploy to Azure: name: Build and deploy ASP.Net Core app to Azure Web App - project-test-api on: p
I am creating a restful web-service using .net and Newtonsoft for serialization/deserialization. The aim is to force exceptions (preferably HTTP 400) when a re
Why does my serialized JSON end up as {"Gender":1,"Dictionary":{"Male":100,"Female":200}} i.e. why do the enums serialize to their value, but when they form th
[EDIT 3: bottom line, this stuff can work but is fragile. take a false step and VS will pull in undesired versions. Be prepared to backup, undo changes, and tr
Currently, I have some issues. I'm using C# with Json.NET. The issue is that I always get: {"Unexpected character encountered while parsing value: e. Path '',
i want to stream online videos ..but i am facing j query error Not allowed to load local resource: ...i find many solution but that all did not work for me. he
I used nuget to install Json.NET into my Unity project but the issue is when I launch it throws The type or namespace 'Newtonsoft' could not be found. Are you m
I used nuget to install Json.NET into my Unity project but the issue is when I launch it throws The type or namespace 'Newtonsoft' could not be found. Are you m
I am writing a method that takes a British post code and returns the Latitude and Longitude of this postcode as a "Location" object. public class Location {
I am serializing using Json.NET, but the resulting string ends up way too long, because it includes a ton of surplus info about the assembly that I have no use