Uncaught SyntaxError: JSON. parse: unexpected character at line 1 column 1 of the JSON data | 500 Internal Server Error

json PHP Tutorial Website

If you come across this error on your website, there could be a Syntax error with your JSON code.

The possible solution if you have the following code:

header(‘Content-Type’, ‘application/json’);

You need to change to:

header(‘Content-Type: application/json’);