标签: ajax asp.net-mvc json
AJAX调用返回的JSON对象可能有多个具有NULL值的属性:
{ Id: 1, Prop1: null, Prop2: null, Prop3: "abc" }
有没有办法告诉MVC跳过返回对象中的空值? JSON对象的这种精简版本会减少很多有效负载。
{ Id: 1, Prop3: "abc" }
有没有人对这种方法有任何想法?