以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]JSON数据NULL判断 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=171229) |
|
-- 作者:crazyfengyu -- 发布时间:2021/8/23 11:23:00 -- [求助]JSON数据NULL判断 请问:解析到的JSON格式为 {
"result":null,
"code":400,
"msg":"获取失败" } dim jo as JObJect = JObject.Parse(json) if jo("result") = \'\' then
//无法进入此代码块 end if if jo("result") = "null" then
//无法进入此代码块 end if 判断result 是否为 null 应该如何判断? 直接通过""无法判断,判断"null"这个也无法判断,应该如何对null判断 |
|
-- 作者:有点蓝 -- 发布时间:2021/8/23 11:38:00 -- if jo("result") is nothing then |
|
-- 作者:crazyfengyu -- 发布时间:2021/8/23 11:54:00 -- 当result 为 null
|
|
-- 作者:有点蓝 -- 发布时间:2021/8/23 11:58:00 -- if jo("result").ToString = "" then |