Created
September 28, 2011 05:38
-
-
Save lsauer/1247072 to your computer and use it in GitHub Desktop.
jquery doesn't parse JSON with comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
$.getJSON('b8irg1.json', function(data) { console.log(data);}); | |
will only contain an responseText property but not the JSON.parse'd data appended if the JSON file contains comments of the kind '// or /*...*/' | |
Note tried with jquery 1.6.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any updates? It would be helpful to include comments in my JSON.