Suppose I have the following class -
public class A
{
public int P1 { get; internal set; }
}
Using json.net, I am able to seria
After some experimenting, I've found that a property is deserialised correctly if you decorate your property with:
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
Applying to the class in the original question:
public class A
{
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
public int P1 { get; internal set; }
}