FormatException (FormatException: 在字符1处出现意外字符) flutter

huangapple go评论63阅读模式
英文:

FormatException (FormatException: Unexpected character (at character 1) flutter

问题

我从Flutter中向.NET Core 6 Web API的SQL Server中提取数据时遇到了这个错误,请帮助解决。

我在互联网上进行了搜索,但找不到任何解释解决方案的内容。
在这个网站上已经有人提出了这个问题,但没有提供完整的答案或者解决方案没有明确说明。是否有人可以帮助解决这个问题?

英文:

enter image description here

I am getting this error from flutter while pulling data from flutter to sql server with net core 6 wep api please help

I searched on the internet but couldn't find anything that explains the solution.
It has been asked on this site, but the full answer has not been given or the solution has not been clearly stated. can anyone help solve this problem

答案1

得分: 2

收到的响应不包含JSON数据,而是包含HTML数据。json.decode函数无法识别<字符,这导致了错误。

我建议检查您发送的请求头或检查Web后端以确保您收到正确的数据格式。

英文:

The response you are receiving does not contain JSON data; it contains HTML data. The "<" character is not recognized by the json.decode function, which is causing the error.

I recommend checking the headers you are sending with the request or inspecting the web backend to ensure you are receiving the correct data format.

huangapple
  • 本文由 发表于 2023年7月28日 04:06:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76783089.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定