Answers for "c# json serialization exception a memeber wi th name already exists"

C#
0

c# json serialization exception a memeber wi th name already exists

// Your object already has an JsonProperty with the same property name e.g.
class Obj {
 	[JsonProperty(PropertyName = "id")]
	Id { get; set; }
 	// [JsonProperty(PropertyName = "id")] // <- Change this
	[JsonProperty(PropertyName = "Obj2Id")] // <- This works because of an
  	// unique property name
	Obj2Id { get; set; }
}
Posted by: Guest on December-07-2020

Code answers related to "c# json serialization exception a memeber wi th name already exists"

C# Answers by Framework

Browse Popular Code Answers by Language