JSON.parse() 与 json.stringfy()

 

JSON.parse() :是将一系列 JSON 格式的字符串转换为 JSON 格式的对象数组

json.stringfy():而这个则是与 JSON.parse() 相反

 

JSON.parse() 在使用过程中,若有特殊字符,会报这个错误

 Uncaught SyntaxError: Unexpected token  in JSON at position 6217

 

posted @ 2018-05-31 14:45  前端开发小姐姐  阅读(201)  评论(0)    收藏  举报