当我解析出json的时候,报错代码:`{"id":"69","title":"测试标题","content":"测试内容 ","time":"2017-07-25 09:01:16","hits":"37","art_love":"0"}]}`报的错误是:Error: Parse error on line 5:...??", "content": "测试内容----------------------^Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'
1 回答
炎炎设计
TA贡献1808条经验 获得超4个赞
const a='{"id":"69","title":"测试标题","content":"测试内容 ","time":"2017-07-25 09:01:16","hits":"37","art_love":"0"}'
var b=JSON.parse(a)
console.log(b)
{ id: '69',
title: '测试标题',
content: '测试内容 ',
time: '2017-07-25 09:01:16',
hits: '37',
art_love: '0' }
添加回答
举报
0/150
提交
取消