If the query is launched using Ajax I think you should add an error control (in jQuery ".ajaxError ()") where you would collect and you could analyze the string returned by the webservices.
I do not know why you get the error but working with JSON data is very easy to damage your exquisite syntax due mainly to transcoding between servers when sending / receiving data (UTF-8 to ASCII and so on) and in file read / write operations for the same reason, maybe even a single non-visible mark (UTF without BOM) in the file from where you obtained the JSON string, and even depending on the OS where the server works: Windows, Linux, Unix, ... by control characters (return, new line, ...)
JSON is a good way to convey information but is quite strict with its syntax: simple commas, omit the initial 0 in decimals, undefined instead of null , ... any control character.
Maybe you should look for the JSON string sent and make sure it does not include any special or not allowed characters. You may find some JSON validation software or even online tools such as: link