“SyntaxError: Unexpected token < in JSON at position 0”

前端 未结 30 1971
花落未央
花落未央 2020-11-22 04:39

In a React app component which handles Facebook-like content feeds, I am running into an error:

Feed.js:94 undefined \"parsererror\" \"SyntaxError: Un

30条回答
  •  深忆病人
    2020-11-22 05:17

    In python you can use json.Dump(str) before send result to html template. with this command string convert to correct json format and send to html template. After send this result to JSON.parse(result) , this is correct response and you can use this.

提交回复
热议问题