113
rated 0 times
[
118]
[
5]
/ answers: 1 / hits: 15722
/ 15 Years ago, mon, november 30, 2009, 12:00:00
I'm developing a simple JavaScript (jQuery) slide show. I wanted to use JSON to store some some static parameters about the content of each slide.
Since I like to keep my data separate from my code, is there anyway to have JavaScript evaluate a .json file?
- AJAX seems a bit overkill - it just needs to evaluate it at run-time, nothing is dynamic.
- I could have a separate .js file that holds my JSON data as an object - but this seems messy.
So before I use one of the above solutions, I just wanted to make sure there wasn't a cleaner way to have JavaScript evaluate a text file.
More From » json