Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 jQuery 反序列化来自服务器的 JSON 响应,但我需要区分空值和空值:
示例响应:
{ "Key1": "Value1", "Key2": null, "Key3": "" }
我可以看到,在原始 JSON 字符串中,这两个值是不同的,但是当我反序列化这两个值时,Key2它们Key3是null. 无论如何我可以说服 jQuery 反序列化器不要将这些值视为相同?
Key2
Key3
null