Basically, im trying to use XMLHttpRequest to load a .json file i've included in my working files in XDK. I'm loading the filename as the url, so for example im loading
url = "MyFile.json"
xhr.open( 'GET', url, true );
Then i look at responseText in an onreadystatechange function when readystate is done and status indicates everythings finished. Normally when I run stuff in my desktop browser or even in the XDK emulator for any device, everything works as intended. The problem is that when I package the project using crosswalk, something seems to be going wrong and responseText returns null/false/undefined whatever, indicating SOMETHING (but i'm not sure what) didn't work, and my file fails to load.
This may be a little vague but i'm doing my best with what i understand. XDK and crosswalk are new to me and i'm very uncertain where the issue lies. After building and rebuilding my application many times without any idea how or why things are messing up, i'm hoping someone can help me out. perhaps its something simple like the url of these files being different, or maybe its something complicated that requires cross-origin stuff. I don't really know and i've searched quite a bit with nothing coming up so far.
I'm using three.js and specifically this problem seems to be with the JSONLoader component, but really i don't mind rewriting any loader, i just need the xmlHttpRequest to get me the file.
UPDATE
Doing a little bit of digging I feel like i'm on the track but theres some small thing i'm missing. responseText is empty, but other than that im already following all the guidelines i can find online for loading files from the assets/www/ folder. Is the issue perhaps with me loading a file with the extension ".json" or ".js"?