ASP.NET Web API partial response Json serialization
I am implementing a Web API that supports partial response. /api/users?fields=id,name,age Given the class User [JsonObject(MemberSerialization.OptIn)] public partial class User { [JsonProperty] public int id { get; set; } [JsonProperty] public string firstname { get; set; } [JsonProperty] public string lastname { get; set; } [JsonProperty] public string name { get { return firstname + " " + lastname; } } [JsonProperty] public int age { get; set; } } The Json formatter works great when serializing the all properties, but I can't manage to modify it at runtime to tell it to ignore some of the