[Full]
完整版
[Rss]
订阅
[Xml]
无图版
[Xhtml]
无图版
Rss
& SiteMap
Foxtable(狐表)
http://www.foxtable.com
新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
◎
Foxtable(狐表)
→
专家坐堂
→
[求助]关于josn解析
共6 条记录, 每页显示 10 条, 页签:
[1]
[浏览完整版]
标题:[求助]关于josn解析
1楼
zto001
发表于:2024/8/26 11:15:00
{"content":"76414989517298\r\n78440201872821\r\n76414989517298\r\n76415372357785\r\n76412299689841登记拦截","final_from_name":"测试名","final_from_wxid":"wxid_62q7me1l6ken12","from_name":"红星中通61-售后群翊邮-仙鸾-风柳-朱","from_wxid":"53284710703@chatroom","is_pc":0,"msg_type":1,"msgid":"8904268467146888670","original_content":"37363431343938393531373239380A37383434303230313837323832310A37363431343938393531373239380A37363431353337323335373738350A3736343132323939363839383431E799BBE8AEB0E68BA6E688AA","robot_wxid":"wxid_ap0qjgxd6j8122","timestamp":1724426837,"to_name":"立秋","to_wxid":"wxid_ap0qjgxd6j8122"}
上面这段josn,我只解析出76414989517298这个,后面的都没有解析出来,我这是什么原因?而且多行json只解析了前面14行,在15行直接出错
Dim s As String = FileSys.ReadAllText("C:\Users\admin\Desktop\微信机器人\定制版接收文本.txt", Encoding.Default)
'Output.Show(s)
Dim Values() As String
Values = s.split(Chr(13) & Chr(10))
For Index As Integer = 0 To Values.Length - 1
Dim json As String = Values(Index)
Dim jo As JObject = JObject.Parse(json)
Output.Show(jo("content"))
Next
2楼
有点蓝
发表于:2024/8/26 11:32:00
Dim s As String = FileSys.ReadAllText("D:\问题\1.txt")
'Output.Show(s)
Dim jo As JObject = JObject.Parse(s)
' Output.Show(jo("content").ToString)
For Each a As String In jo("content").ToString.Replace(vbcr, "").Split(vblf)
Output.Show(a)
Next
3楼
zto001
发表于:2024/8/26 16:49:00
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2024.8.21.1
错误所在事件:窗口,微信信息记录,记录,Click
详细错误信息:
After parsing a value an unexpected character was encountered: t. Path 'to_name', line 2, position 365.
这是啥意思?每次读取到接近两千行的时候就报错
4楼
有点蓝
发表于:2024/8/26 16:54:00
json数据自己的问题,比如应该使用双引号的,用成了单引号
5楼
zto001
发表于:2024/8/26 18:04:00
最后一行是空的,怎么剔除?
6楼
有点蓝
发表于:2024/8/26 20:25:00
s = s.trim(vbcr,vblf," ")
共6 条记录, 每页显示 10 条, 页签:
[1]
Copyright © 2000 - 2018
foxtable
.com
Tel: 4000-810-820 粤ICP备11091905号
Powered By
Dvbbs
Version 8.3.0
Processed in .01563 s, 2 queries.
[Full]
完整版
[Rss]
订阅
[Xml]
无图版
[Xhtml]
无图版