JSON Parse error: Unrecognized token'<' - react-native

前端 未结 10 1641
执笔经年
执笔经年 2020-12-09 11:21

\"JSON Parse error: Unrecognized token\'<\'\" Error is showing while hitting the api. Code is attached below Note* : Response is in the JSON format.

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 12:03

    this is likely when you receive html tag format from the server not the json check out the server encoding the data into proper json format you can check response by response.text() if it works than you are receiving text format.

提交回复
热议问题