以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 如何解析数据 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=176395) |
||||
-- 作者:lxhmax -- 发布时间:2022/4/11 17:30:00 -- 如何解析数据
请问老师,文件里面下面这段内容要如何解析出来? {\\\\\\"key\\\\\\":\\\\\\"MoneyField_1ZSMX9Y5B0CG0\\\\\\",\\\\\\"label\\\\\\":\\\\\\"报销金额(元)\\\\\\",\\\\\\"value\\\\\\":\\\\\\"108.8\\\\\\",\\\\\\"bizAlias\\\\\\":\\\\\\"reimbursementMoney\\\\\\",\\\\\\"extendValue\\\\\\":\\\\\\"{\\\\\\\\\\\\\\"upper\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"壹佰零捌元捌角\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"componentName\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"MoneyField\\\\\\\\\\\\\\"}\\\\\\"}, {\\\\\\"key\\\\\\":\\\\\\"DDDateField_192R06VEL8V40\\\\\\",\\\\\\"label\\\\\\":\\\\\\"费用发生日期\\\\\\",\\\\\\"value\\\\\\":\\\\\\"2022-04-09\\\\\\",\\\\\\"bizAlias\\\\\\":\\\\\\"occurDate\\\\\\"}, {\\\\\\"key\\\\\\":\\\\\\"DDSelectField_1WT1QT4H82ZK0\\\\\\",\\\\\\"label\\\\\\":\\\\\\"费用类型\\\\\\",\\\\\\"value\\\\\\":\\\\\\"报销/汽车使用费\\\\\\",\\\\\\"bizAlias\\\\\\":\\\\\\"reimbursementType\\\\\\",\\\\\\"extendValue\\\\\\":{\\\\\\"label\\\\\\":\\\\\\"报销/汽车使用费\\\\\\",\\\\\\"key\\\\\\":\\\\\\"EXP_101A519FA519212CB4200002\\\\\\"}}, {\\\\\\"key\\\\\\":\\\\\\"TextareaField_19ET4SHSB6HS0\\\\\\",\\\\\\"label\\\\\\":\\\\\\"费用说明\\\\\\",\\\\\\"value\\\\\\":\\\\\\"开车至公司——江茂华府踩盘——送客户去做核酸——送叶秀丽回华轩居3期——回家\\\\\\",\\\\\\"bizAlias\\\\\\":\\\\\\"expenseDetail\\\\\\"}, |
||||
-- 作者:有点蓝 -- 发布时间:2022/4/11 17:44:00 -- 这种是json嵌套json,需要做3次解析 dim jo as jobject = jobject.parse(1楼文件内容) dim s as string = jo("process_instance")("form_component_values")(1)("value").tostring Dim ja As JArray = JArray.Parse(s) dim s2 as string = ja(0)("value").tostring Dim ja2 As JArray = JArray.Parse(s2) msgbox(jo2(0)("rowValue")(0)("key").tostring)
|