Failed to parse json string into JavaScript Object -


i hava json string(json object) need parsed js object, failed.

json:

result = {"user":{"name":"laoqiren","email":"7806494@qq.com","i mage":"https://sfault-avatar.b0.upaiyun.com/888/223/8882 23038-5646dbc28d530_huge256"},"totaltime":1.5,"date":"20 16-09-23","comment":"fffff"} 

error:

unexpected end of input 

why?

following code working me

var result = '{"user":{"name":"laoqiren","email":"7806494@qq.com","i mage":"https://sfault-avatar.b0.upaiyun.com/888/223/8882 23038-5646dbc28d530_huge256"},"totaltime":1.5,"date":"20 16-09-23","comment":"fffff"}';    var obj = json.parse(result);  console.log(obj);


Comments