JSON response format error - red dot\bullet before response

后端 未结 5 1991
南笙
南笙 2020-11-30 09:29

I am sending an AJAX request expecting JSON response. However, the returned JSON is preceded with a red dot\\bullet which is causing a parse error.

Here is a screens

5条回答
  •  温柔的废话
    2020-11-30 09:55

    If your files are encoding with UTF-8, better to encode them with UTF-8 without BOM. This can be easily done through notepad++. The steps are as follows,

    1. Open your files in notepad++.
    2. Go to Encoding option on the file menu.
    3. Then select the option "convert to UTF-8 without BOM".

    This may resolve your problem.

提交回复
热议问题