How to deserialize a property with a dash (“-”) in its name with NewtonSoft JsonConvert?

To answer the question on how to do this WITH NewtonSoft, you would use the JsonProperty property attribute flag.

[JsonProperty(PropertyName="non-veg")]
public string nonVeg { get; set; }

Leave a Comment