Consider there is a class like
public class Test{
[JsonProperty("name")]
public string Name {get; set;}
[JsonProperty("age")]
public string Age {get; set;}
}
I want this to be serialized like this: {"name": "a", "age": "10"}
There is a setting CamelCaseNamingStrategy
in Json.net library. If I dont use the JsonProperty
I can still achieve the above result.
The example given above is a small, but what if we have to serialize/deserialize bigger models frequently. Will adding the JsonProperty attribute for each property be a good thing for performance?
Thanks in advance.. :)