skip to Main Content

How to deserialize JSON (Cannot deserialize the current JSON object (e.g. {""name"":""value""}) into type 'System.Collections.Generic.List`1)

Upon serializing the JSON if shows an error like this one. (Cannot deserialize the current JSON object (e.g. {""name"":""value""}) into type 'System.Collections.Generic.List`1) This is my code on serializing json Dim test As List(Of properties) = Newtonsoft.Json.JsonConvert.DeserializeObject(Of List(Of properties))(response) e.Result =…

VIEW QUESTION

Json conversion of enums to strings

I have the following class: using Newtonsoft.Json; using Newtonsoft.Json.Converters; public class JsonError { [JsonConverter(typeof(StringEnumConverter))] public enum Number { [EnumMember(Value = "0")] Pass, [EnumMember(Value = "1")] Miscalc, [EnumMember(Value = "2")] ReadError } public Number ErrorNumber { get; set; } } And…

VIEW QUESTION
Back To Top
Search