When using Json.NET to deserialize a JSON string into an object, how do I require a key/property to be present in the JSON stirng, but allow for NULL values?
For exa
Ugh. I should have spend a little more time in the Json.NET documentation...
The answer is the the Required property of the JsonPropertyAttribute, which is of enum type Newtonsoft.Json.Required
Required
JsonPropertyAttribute
enum
[JsonProperty(Required = Newtonsoft.Json.Required.AllowNull)] public string Description {get; set;}