Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Anthony,
I'm in the process of rebuilding my site and I'm making use of Stacey's JSON support. I noticed that my AJAX calls were failing because MooTools was saying that the returned JSON was invalid. I ran the output through a couple of online validators and sure enough, it was invalid with the footer comment. I did a little more research and found that there is apparently no comment delimiter to the JSON spec.
I posted a comment on the Get Satisfaction forum the other day:
http://getsatisfaction.com/stacey/topics/json_files_outputted_by_stacey_cant_be_parsed_with_jquery
... but I figured it made more sense to offer a fix for the issue. This commit includes the following:
In cache.inc.php:
I also created a json example template, so the example site now outputs a JSON object with the projects when you hit /json. The only minor snag I hit there was that when I output the array of images, I only want to put a comma after the entry when we're not on the last image (which I can do with the array of projects, using @is_last), but I didn't see a variable that can check that.
Anyhow, take a look over my changes and let me know what you think. I can be reached at jason@blackantmedia.com.
Thanks!
Jason