-1

I have a list generated by a xml file, with filters made in Javascript. Recently, those filters have stopped to work and by the console, I can see this error message: "SyntaxError: Unexpected token  in JSON at position 0".

Here the url of the webpage: http://www.ieseg.fr/en/faculty-and-research/faculty-directory/ When you select one of the filters, there is an error and it doesn't display the data at all.

This error appears only online. It works well on local.

Note that I'm a beginner on Javascrip development :)

Do you have an idea on how to solve this? Do you need more details about something?

Thank you very much for your feedback, I'll appreciate it.

  • 1
    code, and json response that's failing, along with one that works, would be a good start. You have invalid json, plain and simple. – Kevin B May 31 '17 at 17:41
  • Check the "Network" monitoring in your browser's developer tools. That will let you see the details of the request and response. With that, you can verify that the request succeeded (200 OK response status), that the response contains only the expected content (JSON-formatted data), etc. – Jonathan Lonowski May 31 '17 at 17:44
  • See the previous comments. Additionally I just looked at the response and Chrome Dev Tools is showing a red dot in front of the response (even Postman - a Chrome Addon - is showing it). So your server seems to insert an invisible character. For more help we need more information about the backend. – theiNaD May 31 '17 at 17:50
  • @theiNaD Ok, what kind of information would you need about the backend? – Anaïs A. Jun 08 '17 at 16:15

1 Answers1

0

You have an \ufeff character in front of your JSON response payload, this could be causing the issue..

Removing the "\ufeff" from the end of object -> content in Google+ API json result

Woodrow
  • 2,740
  • 1
  • 14
  • 18