以下编码的JSON导致错误
第9行的解析错误:... 0.0.1","管理员(蓝色)更改 ---------------------- ^期待' STRING',' NUMBER',' NULL' ,' TRUE',' FALSE',' {',' ['
我是JSON的新手所以任何人都可以帮我解决此错误
{
"draw": 2,
"recordsTotal": 1739,
"recordsFiltered": 1739,
"data": [
[
"22-Apr-15 03:37 pm",
"Task",
"127.0.0.1",
"Admin (Blue) Changed Plan to Task On:<\/b> 22-04-2015 03:37:51 PM
CURRENT-Task Title: admin to employeee NEW-Task Title: admin to employeeesdfsd, CURRENT-Description: admin to employeeeadmin to employeeeadmin to employeee, NEW-Description: admin to employeeeadmin to employeeeadfdmin to employeee, CURRENT-Priority: Medium, NEW-Task Priority: Low, CURRENT-Size: Small, NEW-Size: Big, CURRENT-Status: Last, NEW-Task Status: S, CURRENT-Background Color: Empty, NEW-Background Color: #b83939, CURRENT-Text Color: Empty, NEW-Text Color: #faf5f5, CURRENT-Assigned To: Raja(Admin), NEW-Assigned To: Raja(Admin), Vimala(Bharath), CURRENT-Completion Date: 16-04-2015, NEW-Completion Date: 18-04-2015"
],
[
"22-Apr-15 03:38 pm",
"Task",
"127.0.0.1",
"Bharath (Task) Task Edited On:<\/b> 22-04-2015 03:38:41 PM
OLD-Task Title:admin to employeee, NEW-Task Title:admin to employeeesdfsd, OLD-Description:admin to employeeeadmin to employeeeadmin to employeee NEW-Description:admin to employeeeadmin to employeeeadfdmin to employeee, OLD-Priority:Medium, NEW-:PriorityLow, OLD-Size:Small, NEW-Size:Big, OLD-Status:S, NEW-Status:S, OLD-Assigned To:Raja(Admin), NEW-Assigned To:Raja(Admin), Vimala(Bharath), OLD-Completion Date:16-Apr-2015, NEW-Completion Date:18-Apr-2015"
],
[
"22-Apr-15 03:41 pm",
"Plan",
"127.0.0.1",
"Bharath (Task) Plan Assigned On:<\/b> 22-04-2015 03:41:25 PM
Plan Title:sdfs, Assigned To: Manickam(Admin), Priority: Medium, Size: Small, Completion Date: 20-04-2015"
],
[
"22-Apr-15 03:41 pm",
"Plan",
"127.0.0.1",
"Bharath (Task) Plan Assigned On:<\/b> 22-04-2015 03:41:57 PM
Plan Title:erwe, Assigned To: Admin, Priority: High, Size: Medium, Completion Date: 24-04-2015"
],
[
"22-Apr-15 04:13 pm",
"Plan",
"127.0.0.1",
"Admin (Blue) Plan Assigned On:<\/b> 22-04-2015 04:13:46 PM
Plan Title:dfg, Assigned To: Admin, Priority: Medium, Size: Medium, Completion Date: 09-04-2015"
],
[
"22-Apr-15 04:22 pm",
"Plan",
"127.0.0.1",
"Admin (Blue) Plan Completed On:<\/b> 22-04-2015 04:22:24 PM
Plan Title:sdf"
],
[
"22-Apr-15 04:22 pm",
"Plan",
"127.0.0.1",
"Admin (Blue) Plan Uncompleted On:<\/b> 22-04-2015 04:22:34 PM
Plan Title:activity assigned"
],
[
"22-Apr-15 04:22 pm",
"Plan",
"127.0.0.1",
"Admin (Blue) Plan Uncompleted On:<\/b> 22-04-2015 04:22:35 PM
Plan Title:activity assigned"
],
[
"22-Apr-15 04:26 pm",
"Task",
"127.0.0.1",
"Admin (Blue) Edition Awaiting Approval On:<\/b> 22-04-2015 04:26:36 PM
Task Title: activity assigned, CURRENT-Description: sdfs, NEW-Description: sdfswerwe"
],
[
"22-Apr-15 04:26 pm",
"Plan",
"127.0.0.1",
"Admin (Blue) Plan Edition Changes Undone On:<\/b> 22-04-2015 04:26:52 PM
Plan Title:activity assigned, CURRENT-Description:sdfs NEW-Description:sdfswerwe"
]
]
}
答案 0 :(得分:1)
您的字符串中有原始换行符。第一个是在
的末尾 "Admin (Blue) Changed Plan to Task On:<\/b> 22-04-2015 03:37:51 PM
你不能用JSON做到这一点。如果您想在字符串中添加换行符,请使用\n
。
附注:如果您是JSON新手,http://jsonlint.com/是您的朋友。但是,在这种情况下你得到的错误并不是很有用。