JsonConvert.SerializeObject(model, new JsonSerializerSettings {
NullValueHandling = NullValueHandling.Ignore
})
未过滤null序列化结果
"memberquery": {
"name": "test",
"sex": "女",
"phonenumber": Null
"birthdate": Null
}
已过滤null序列化结果
"memberquery": {
"name": "test",
"sex": "女",
}