Web API 2 - returning JSON, a property that is false is not included
The JSON returned when a REST request is made all works great except any
bool property, if false, does not get included in the JSON (verified via
Fiddler). I tried:
[DataMember(IsRequired = true)]
public bool success { get; set; }
but it still didn't return it.
Any suggestions? And I do like that it doesn't return anything for nulls,
it's just bools that I want always returned.
No comments:
Post a Comment