I'm trying to load a JSON string (from a project file) that defines the layout of various levels for my game. Here's what the level_definition.json file contains:
{
"Simple Tap": [ [ [1] ] ],
"Double Tap": [ [ [1],[2] ] ],
"Triple Tap": [ [ [1],[2],[3] ] ],
"Quad Tap": [ [ [1],[2],[3],[4] ] ],
"Quad Tap Double Back": [ [ [1],[2],[4],[3] ] ],
"Single Double": [ [ [1,3],[2] ] ],
"Triple Back and Forth": [ [ [1],[2,4],[3] ] ],
"Three Drum Intervals": [ [ [1,3],[2],[4] ] ],
"Angled Triple": [ [ [1],[2] ], [ [3],[0] ] ],
"Four Drum Square Reverse": [ [ [1],[2] ], [ [3],[4] ] ],
"Four Drum Square Rounder": [ [ [2],[1] ], [ [3],[4] ] ]
}
So, each object has a name and a layout (as an array).
When I read it in, I get this result (appending array_Levels.AsJSON to the log of a DebugPanel window): {"c2array":true,"size":[1,1,1],"data":[[[0]]]}
1) Is my format wrong?!
2) If it's the correct format, can the AJAX object not import it for some reason? My guess is, it chokes on the multi-level array definition. If that's the case, how can I otherwise read this into a C2 array?
Thank you!