On my lunch break today I created a .json file and tried to use AJAX to populate an array. It's not working and for the life of me I can't figure out why.
Here's what I'm doing:
1. I created a .json file using c2array format. (See below.)
2. I imported the .json file to the Files area.
3. On Start of Layout I use AJAX to request the file.
4. When the .json file is Completed I Load (into the Array) from JSON string "AJAX.LastData"
When I run in debug mode I can see the .json text in LastData, but my array has 10 values and they are all 0.
A minute ago, as a test, I downloaded the array to a .json file, added that to my project files, tweaked a couple of values and tried again. That's not working either, for some reason. Is it an encoding issue on the text file? According to Notepad++ I'm using UTF-8.
-------------------------------------
{
"c2array": true,
"size": [100, 1, 1],
"data": [
[
[0]
],
[
[1]
],
[
[2]
],
etc.
[
[100]
]
]
}
[/code:1voymjgm]