Issue with JSON string
Posted: Wed Feb 03, 2016 9:05 am
I'm trying to use Dojo to make an Ajax call to a php program that returns a result set. I can see the json string in PHP Netbeans debugger just fine, but when it comes back to my script, the response is returning an Unexpected Token :. I think this means that it's seeing a colon (:) in the wrong place. The only thing I can think of is the PHP program is returning the JSON string wrapped in double quotes, which is throwing off the parser. When I copy the string from the Netbeans debugger and put it into JSONLint, it errors, but when I remove the outer quotes, it validates fine.
Funny thing is that if I call the php program that generates the JSON directly and just echo the results to the browser, I don't see the quotes.
Any Ideas on how to debug?
Thanks in advance.
Funny thing is that if I call the php program that generates the JSON directly and just echo the results to the browser, I don't see the quotes.
Any Ideas on how to debug?
Thanks in advance.