阅读背景:

JSON序列化器在反序列化失败时创建一个空对象,而不是空对象

来源:互联网 

In WebAPI, I've noticed an inconsistency that is messing with our validation practices. If you send a bad body/payload with a POST in xml, deserialization fails and you get an null pointer. If you send a bad body/payload in JSON, you get an empty object instead. It is misleading and I don't like it. Is there a way to force a null pointer with a failed json deserialization??In WebAPI, I've noticed an inconsistency that i




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: