以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何获取json的键值 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=159013) |
-- 作者:fntfgz -- 发布时间:2020/12/10 16:19:00 -- 如何获取json的键值 老师,我有下面一段json代码 {"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"undergraduateId":1,"serialNumber":"1","schoolName":"北京大学","schoolCode":"4111010001","competentAuthority":"教育部","provinceCity":"北京市","city":"海淀区","schoolLevel":"本科","schoolNature":"公办","whether985":"985","whether211":"211","firstInstitutions":"A","firstDiscipline":"是","researchQualification":"是","autonomousMarking":"是","typeInstitution":"综合","internetSite":"http://www.pku.edu.cn/","schoolAddress":"燕园校区(校本部):北京市海淀区颐和园路5号\\n医学部:北京市海淀区学院路38号\\n昌平校区:北京市昌平区十三陵镇西山口村\\n大兴校区:北京市大兴工业开发区金苑路24号\\n无锡校区:无锡市滨湖区未名路\\n深圳研究生院:深圳市南山区丽水路2199号","admissionsOfficePhone":"010-62751407","admissionsOfficeEmail":"bdzsb@pku.edu.cn","reserved1":null,"reserved2":null} 我想提取里面的键值,咱们的Foxtable采用的是第三方库Newtonsoft.JSON。请问有没有相关的命令 |
-- 作者:有点蓝 -- 发布时间:2020/12/10 16:53:00 -- Dim json As String = "{\'name\':\'李云龙\',\'age\':\'36\'}" Dim jo As JObject = JObject.Parse(json) For Each it As object In jo Output.Show(it.key & "-" & it.value) Next |