uncaught syntaxerror unexpected token U JSON

I get this error “uncaught syntaxerror unexpected token U” when I run my page in chrome. And in firefox I get, “JSON.parse: unexpected character”. I’m returning the json data from a php file and the returning json string is valid. I checked it with http://jsonlint.com/ . Any help would be appreciated… Thanks. Here’s the returned JSON string

Yahoo Finance All Currencies quote API Documentation

From the research that I’ve done, there doesn’t appear to be any documentation available for the API you’re using. Depending on the data you’re trying to get, I’d recommend using Yahoo’s YQL API for accessing Yahoo Finance (An example can be found here). Alternatively, you could try using this well documented way to get CSV data from … Read more

Can comments be used in JSON?

No. The JSON is data only, and if you include a comment, then it will be data too. You could have a designated data element called “_comment” (or something) that should be ignored by apps that use the JSON data. You would probably be better having the comment in the processes that generates/receives the JSON, … Read more

What is the easiest way to convert an Excel spreadsheet with tabular data to JSON? [closed]

Assuming you really mean easiest and are not necessarily looking for a way to do this programmatically, you can do this: Add, if not already there, a row of “column Musicians” to the spreadsheet. That is, if you have data in columns such as: Rory Gallagher Guitar Gerry McAvoy Bass Rod de’Ath Drums Lou Martin … Read more

Use of PUT vs PATCH methods in REST API real life scenarios

NOTE: When I first spent time reading about REST, idempotence was a confusing concept to try to get right. I still didn’t get it quite right in my original answer, as further comments (and Jason Hoetger’s answer) have shown. For a while, I have resisted updating this answer extensively, to avoid effectively plagiarizing Jason, but … Read more

Grabbing the current viewer count for youtube live streaming

UPDATE 2: YouTube has unfortunately dropped support for this method. Hopefully there will be a new solution in the future without using their API (since it has quote limits). Try this link: https://www.youtube.com/live_stats?v={videoid} Find a Live event on YouTube and replace the video id in the link. This should retrieve the number of concurrent views for that … Read more

Can comments be used in JSON?

No. The JSON is data only, and if you include a comment, then it will be data too. You could have a designated data element called “_comment” (or something) that should be ignored by apps that use the JSON data. You would probably be better having the comment in the processes that generates/receives the JSON, as they … Read more

Can comments be used in JSON?

The JSON is data only, and if you include a comment, then it will be data too. You could have a designated data element called “_comment” (or something) that should be ignored by apps that use the JSON data. You would probably be better having the comment in the processes that generates/receives the JSON, as they are … Read more