开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 371|回复: 7
收起左侧

[已解决] 请问为什么json解析会解析失败啊

 关闭 [复制链接]
结帖率:81% (54/67)
发表于 2024-1-26 17:20:44 | 显示全部楼层 |阅读模式   湖南省岳阳市
30精币
var all_1_data = {"conf":{"js_var":"all_1_data"},"data":[{"id":"1979254","title":"\u4e09\u8258\u6838\u822a\u6bcd\u96c6\u7ed3\uff0c\u201c\u7f8e\u65e5\u97e9\u6b63\u5728\u51c6\u5907\u6218\u4e89\u201d\uff01\u6df1\u591c\u5d29\u76d8\uff0c\u84b8\u53d1801\u4ebf\u7f8e\u5143\uff01\u6caa\u94dc\u8df3\u7a7a\u9ad8\u5f00\uff0c\u53d1\u751f\u4e86\u4ec0\u4e48\uff1f","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/money\/future\/roll\/2024-01-26\/doc-inaevafp7855484.shtml","create_date":"2024-01-26","create_time":"07:25:26","cat_name":"finance_0_suda","top_time":"20240126","top_num":"14,458","ext1":"","ext2":"","ext3":"","ext4":"naevafp7855484","ext5":"","time":"Fri, 26 Jan 2024 07:25:26 +0800"},{"id":"1979261","title":"\"\u4e2d\u5b57\u5934\"\u5927\u7206\u53d1\uff01\u591a\u5bb6\u592e\u4f01\u5bc6\u96c6\u8868\u6001\uff0c\u5e02\u503c\u7ba1\u7406\u5c06\u8fd9\u6837\u505a\u2026\u2026","media":"\u5238\u5546\u4e2d\u56fd","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/stock\/zqgd\/2024-01-26\/doc-inaevafk0431400.shtml","create_date":"2024-01-26","create_time":"07:54:43","cat_name":"finance_0_suda","top_time":"20240126","top_num":"8,580","ext1":"","ext2":"","ext3":"","ext4":"naevafk0431400","ext5":"","time":"Fri, 26 Jan 2024 07:54:43 +0800"},{"id":"1979270","title":"\u52a0\u5feb\u63a8\u8fdb\u57ce\u5e02\u623f\u5730\u4ea7\u878d\u8d44\u534f\u8c03\u673a\u5236\u843d\u5730\u89c1\u6548","media":"\u8bc1\u5238\u65e5\u62a5","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaeurrv4857527.shtml","create_date":"2024-01-26","create_time":"02:08:36","cat_name":"finance_0_suda","top_time":"20240126","top_num":"8,467","ext1":"","ext2":"","ext3":"","ext4":"naeurrv4857527","ext5":"","time":"Fri, 26 Jan 2024 02:08:36 +0800"},{"id":"1979272","title":"\u7279\u65af\u62c9\u76842024\u6709\u70b9\u96be\uff1a\u4e2d\u56fd\u5e02\u573a\u5b9e\u5728\u592a\u5377\uff0c\u7f8e\u56fd\u8981\u548c\u6df7\u52a8\u7ade\u4e89","media":"\u65b0\u6d6a\u79d1\u6280","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/tech\/shenji\/2024-01-26\/doc-inaevafr4631462.shtml","create_date":"2024-01-26","create_time":"07:18:20","cat_name":"finance_0_suda","top_time":"20240126","top_num":"7,327","ext1":"","ext2":"","ext3":"","ext4":"naevafr4631462","ext5":"","time":"Fri, 26 Jan 2024 07:18:20 +0800"},{"id":"1979273","title":"\u56fd\u5bb6\u91d1\u878d\u76d1\u7ba1\u603b\u5c40\uff1a\u5916\u56fd\u8d44\u672c\u53ef\u4ee5\u6301\u6709\u94f6\u884c\u4fdd\u9669\u673a\u6784100%\u7684\u80a1\u6743","media":"\u5a92\u4f53\u6eda\u52a8","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaevhpp4519464.shtml","create_date":"2024-01-26","create_time":"08:45:26","cat_name":"finance_0_suda","top_time":"20240126","top_num":"6,135","ext1":"","ext2":"","ext3":"","ext4":"naevhpp4519464","ext5":"","time":"Fri, 26 Jan 2024 08:45:26 +0800"},{"id":"2500765","title":"\u8f6f\u94f6\u60ca\u5929\u64cd\u4f5c\u66dd\u5149\uff1a\u6084\u7136\u6e05\u7b97\u963f\u91cc\u5df4\u5df4\u5de8\u989d\u80a1\u7968\uff0c\u72c2\u63fd611\u4ebf\u975e\u7ecf\u5e38\u6027\u6536\u5165\uff01","media":"\u91d1\u878d\u754c\u7f51\u7ad9","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/roll\/2024-01-26\/doc-inaeumis0782969.shtml","create_date":"2024-01-26","create_time":"08:10:36","cat_name":"finance_0_suda","top_time":"20240126","top_num":"6,033","ext1":"","ext2":"","ext3":"","ext4":"naeumis0782969","ext5":"","time":"Fri, 26 Jan 2024 08:10:36 +0800"},{"id":"2698044","title":"\u53ca\u65f6\u96e8\uff01\u4f4f\u5efa\u90e8\u91ca\u653e\u91cd\u5927\u5229\u597d\uff1a\u4e00\u89c6\u540c\u4ec1\u6ee1\u8db3\u4e0d\u540c\u6240\u6709\u5236\u623f\u5730\u4ea7\u4f01\u4e1a\u5408\u7406\u878d\u8d44\u9700\u6c42","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/china\/gncj\/2024-01-26\/doc-inaevnvh4815649.shtml","create_date":"2024-01-26","create_time":"13:12:02","cat_name":"finance_0_suda","top_time":"20240126","top_num":"5,897","ext1":"","ext2":"","ext3":"","ext4":"naevnvh4815649","ext5":"","time":"Fri, 26 Jan 2024 13:12:02 +0800"},{"id":"3082257","title":"\u5218\u715c\u8f89\uff1a\u592e\u4f01\u8981\u8bb2\u80a1\u6027\u4e86\uff0c2.2\u4ebf\u5e26\u6765\u7684\u6d41\u52a8\u6027\u6ea2\u4ef7\uff0c\u4e2d\u56fd\u7279\u8272\u7684\u4f30\u503c\u4f18\u52bf","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/stock\/2024-01-26\/doc-inaevafr4646856.shtml","create_date":"2024-01-26","create_time":"08:32:29","cat_name":"finance_0_suda","top_time":"20240126","top_num":"5,505","ext1":"","ext2":"","ext3":"","ext4":"naevafr4646856","ext5":"","time":"Fri, 26 Jan 2024 08:32:29 +0800"},{"id":"3279791","title":"1\u670826\u65e5\u64cd\u76d8\u5fc5\u8bfb\uff1a\u5f71\u54cd\u80a1\u5e02\u5229\u597d\u6216\u5229\u7a7a\u6d88\u606f","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/stock\/cpbd\/2024-01-26\/doc-inaevafp7863712.shtml","create_date":"2024-01-26","create_time":"08:09:39","cat_name":"finance_0_suda","top_time":"20240126","top_num":"5,415","ext1":"","ext2":"","ext3":"","ext4":"naevafp7863712","ext5":"","time":"Fri, 26 Jan 2024 08:09:39 +0800"},{"id":"3560028","title":"\u4e2d\u56fd\u9a7b\u6b27\u76df\u4f7f\u56e2\u56e2\u957f\u5085\u806a\uff1a\u5728\u5149\u523b\u673a\u95ee\u9898\u4e0a\uff0c\u6c38\u8fdc\u4e0d\u8981\u4f4e\u4f30\u4e2d\u56fd\u4eba\u7684\u806a\u660e\u624d\u667a","media":"\u754c\u9762\u65b0\u95fb","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/world\/gjcj\/2024-01-26\/doc-inaevafk0429127.shtml","create_date":"2024-01-26","create_time":"09:54:57","cat_name":"finance_0_suda","top_time":"20240126","top_num":"5,274","ext1":"","ext2":"","ext3":"","ext4":"naevafk0429127","ext5":"","time":"Fri, 26 Jan 2024 09:54:57 +0800"},{"id":"4067007","title":"\u201c\u70b9\u77f3\u6210\u91d1\u201d\uff01A\u80a1\u516c\u53f82\u7f8e\u5143\u62ff\u4e0b\u4e00\u5ea7\u5343\u4e07\u5428\u8d44\u6e90\u91cf\u7684\u77ff\uff1f\u8d37\u6b3e\u507f\u8fd8\u65b9\u5f0f\u6709\u7384\u673a","media":"\u6bcf\u65e5\u7ecf\u6d4e\u65b0\u95fb","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/roll\/2024-01-26\/doc-inaeuvxt4747146.shtml","create_date":"2024-01-26","create_time":"08:11:14","cat_name":"finance_0_suda","top_time":"20240126","top_num":"4,868","ext1":"","ext2":"","ext3":"","ext4":"naeuvxt4747146","ext5":"","time":"Fri, 26 Jan 2024 08:11:14 +0800"},{"id":"4592629","title":"\u8f6f\u94f6\u5b98\u5ba3\uff01\u4e0e\u963f\u91cc\u6709\u5173","media":"\u4e0a\u6d77\u8bc1\u5238\u62a5","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/wm\/2024-01-26\/doc-inaevafp7856601.shtml","create_date":"2024-01-26","create_time":"07:32:24","cat_name":"finance_0_suda","top_time":"20240126","top_num":"4,366","ext1":"","ext2":"","ext3":"","ext4":"naevafp7856601","ext5":"","time":"Fri, 26 Jan 2024 07:32:24 +0800"},{"id":"4876594","title":"\u91d1\u878d\u76d1\u7ba1\u603b\u5c40\u91cd\u78c5\u53d1\u58f0\uff01\u4e8b\u5173\u623f\u5730\u4ea7\u2192","media":"\u592e\u89c6\u8d22\u7ecf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/wm\/2024-01-26\/doc-inaeumiu5336285.shtml","create_date":"2024-01-26","create_time":"00:27:35","cat_name":"finance_0_suda","top_time":"20240126","top_num":"4,030","ext1":"","ext2":"","ext3":"","ext4":"naeumiu5336285","ext5":"","time":"Fri, 26 Jan 2024 00:27:35 +0800"},{"id":"5274624","title":"\u836f\u660e\u7cfb\u4e2a\u80a1\u5348\u540e\u5168\u7ebf\u95ea\u5d29 A\u80a1\u836f\u660e\u5eb7\u5fb7\u8dcc\u505c H\u80a1\u836f\u660e\u5eb7\u5fb7\u8dcc\u8d8530%","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/money\/nmetal\/2024-01-26\/doc-inaevtci4344623.shtml","create_date":"2024-01-26","create_time":"14:20:54","cat_name":"finance_0_suda","top_time":"20240126","top_num":"3,828","ext1":"","ext2":"","ext3":"","ext4":"naevtci4344623","ext5":"","time":"Fri, 26 Jan 2024 14:20:54 +0800"},{"id":"5680022","title":"\u201c\u5e02\u503c\u7ba1\u7406\u201d\u5f3a\u4fe1\u5fc3 \u6df1\u5e02\u56fd\u4f01\u79ef\u6781\u8ddf\u8fdb","media":"\u4e2d\u56fd\u8bc1\u5238\u62a5-\u4e2d\u8bc1\u7f51","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaeuvxr7973880.shtml","create_date":"2024-01-26","create_time":"06:11:29","cat_name":"finance_0_suda","top_time":"20240126","top_num":"3,809","ext1":"","ext2":"","ext3":"","ext4":"naeuvxr7973880","ext5":"","time":"Fri, 26 Jan 2024 06:11:29 +0800"},{"id":"5687072","title":"\u589e\u901f\u4e0b\u6ed1 \u7279\u65af\u62c9\u62bc\u5b9d\u4e0b\u4e00\u4ee3\u8f66\u578b","media":"\u5a92\u4f53\u6eda\u52a8","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaeumiu5339398.shtml","create_date":"2024-01-26","create_time":"00:55:26","cat_name":"finance_0_suda","top_time":"20240126","top_num":"3,754","ext1":"","ext2":"","ext3":"","ext4":"naeumiu5339398","ext5":"","time":"Fri, 26 Jan 2024 00:55:26 +0800"},{"id":"5687238","title":"\u7092\u5730\u56fe\u884c\u60c5\u518d\u73b0 110%\uff01\u4e2d\u5b57\u5934\u5927\u725b\u80a1\u6765\u4e86","media":"\u4e2d\u56fd\u8bc1\u5238\u62a5-\u4e2d\u8bc1\u7f51","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaevnvi7678614.shtml","create_date":"2024-01-26","create_time":"12:46:33","cat_name":"finance_0_suda","top_time":"20240126","top_num":"3,582","ext1":"","ext2":"","ext3":"","ext4":"naevnvi7678614","ext5":"","time":"Fri, 26 Jan 2024 12:46:33 +0800"},{"id":"5687415","title":"\u4f4e\u4f30\u503c\u9ad8\u80a1\u606f \u56fd\u6709\u4f01\u4e1a\u4e2a\u80a1\u5f70\u663e\u6295\u8d44\u4ef7\u503c","media":"\u5e02\u573a\u8d44\u8baf","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/stock\/marketresearch\/2024-01-26\/doc-inaevafp7851855.shtml","create_date":"2024-01-26","create_time":"07:09:07","cat_name":"finance_0_suda","top_time":"20240126","top_num":"2,993","ext1":"","ext2":"","ext3":"","ext4":"naevafp7851855","ext5":"","time":"Fri, 26 Jan 2024 07:09:07 +0800"},{"id":"5687437","title":"\u4e2d\u65b0\u4e92\u514d\u7b7e\u8bc1\u9664\u5915\u843d\u5730 \u201c\u65b0\u9a6c\u6cf0\u201d\u8bf4\u8d70\u5c31\u8d70","media":"\u5a92\u4f53\u6eda\u52a8","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaeumiv8199319.shtml","create_date":"2024-01-26","create_time":"00:55:28","cat_name":"finance_0_suda","top_time":"20240126","top_num":"2,904","ext1":"","ext2":"","ext3":"","ext4":"naeumiv8199319","ext5":"","time":"Fri, 26 Jan 2024 00:55:28 +0800"},{"id":"5687443","title":"\u9ec4\u6cb3\u65f6\u8bc4| \u5a92\u4f53\u8bc4\u5973\u5b50\u906d\u540c\u5b66\u65e0\u89c6\u540e\u8ffd\u8ba8\u793c\u91d1 \uff1a\u5fe0\u4e8e\u81ea\u5df1\u624d\u80fd\u634d\u536b\u96c6\u4f53","media":"\u5a92\u4f53\u6eda\u52a8","author":"","comment_url":"","url":"https:\/\/finance.sina.com.cn\/jjxw\/2024-01-26\/doc-inaevtci4349200.shtml","create_date":"2024-01-26","create_time":"14:37:53","cat_name":"finance_0_suda","top_time":"20240126","top_num":"2,897","ext1":"","ext2":"","ext3":"","ext4":"naevtci4349200","ext5":"","time":"Fri, 26 Jan 2024 14:37:53 +0800"}]};

最佳答案

查看完整内容

去掉开头的 var all_1_data = 和结尾的; 才是正确的json格式

回答提醒:如果本帖被关闭无法回复,您有更好的答案帮助楼主解决,请发表至 源码区 可获得加分喔。
友情提醒:本版被采纳的主题可在 申请荣誉值 页面申请荣誉值,获得 1点 荣誉值,荣誉值可兑换荣誉会员、终身vip用户组。
快捷通道:申请荣誉值无答案申请取消悬赏投诉有答案未采纳为最佳

结帖率:100% (1/1)

签到天数: 2 天

发表于 2024-1-26 17:20:45 | 显示全部楼层   河南省郑州市
去掉开头的
var all_1_data =
和结尾的;
才是正确的json格式

评分

参与人数 1荣誉 +1 收起 理由
笨潴 + 1 热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!

查看全部评分

回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:21:54 | 显示全部楼层   湖南省岳阳市
json无法解析

解析失败.txt

10.94 KB, 下载次数: 0

无法解析

回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:23:05 | 显示全部楼层   湖南省岳阳市
请问怎样删减才能解析成功呢?编码是usc2→ansi
回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:23:50 | 显示全部楼层   湖南省岳阳市
不想用中间取文本的方式,感觉很捞
回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:38:42 | 显示全部楼层   湖南省岳阳市
有办法吗,大佬们
回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:52:15 | 显示全部楼层   湖南省岳阳市
感觉没戏了,解不了
回复

使用道具 举报

结帖率:81% (54/67)

签到天数: 2 天

 楼主| 发表于 2024-1-26 17:56:16 | 显示全部楼层   湖南省岳阳市
afu45 发表于 2024-1-26 17:54
去掉开头的
var all_1_data =
和结尾的;

还是失败
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 诚聘英才| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 800073686,邮箱:800073686@b.qq.com
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表