Edit: You need to import you json file into your project.
From what I understand.
You want to get data in a json file into your game using ajax?
In your projects window you want to import files - in your case it would be your json file. It will now save it allong with the c2 icons. If you save project as project you will see it there. And you can edit it directly. {C2 saves as single or project, project allows you to edit files within the folder structure directly}
Ajax is simple. You request a file dropdown will list files you've imported and tag it with a easy to remember name "MyAwesomeData"
The trick is ajax on "MyAwesomeData" completed, this means it has all your juicy data.
Now you can load from json string using AJAX.LastData to either array or dictionary ect.
Ajax request "your json file you imported into project"
Ajax on completed, load json string ajax.lastdata.
I don't know if this will help: load data from json into array
So, import you json file into the project. and it will save it under Files folder
Hi DUTOIT
Unfortunately my project requires that I be able to edit and replace elements of that JSON and then post them back to a file that is unique to each player. While I have been successful in loading it as a project file as you have described above C2 will not allow you to post changes back to the project file. And I can not use web data as this game will involve a in app store and having that data stored local on a players computer leaves too much to be tampered with. I cant have cheaters ruining my game for not only dose it hurt the paying player but that is money lost
I need to work out how the URL works and how it will find the exact folder I want. I have the cross domain problem solved with a tool for chrome and am able to deploy this site to Azure. But I am stuck on the exact path the AJAX looks up. I can have "http://localhost/PlayerData/"&PlayerID&".json" That PlayerID is a global variable that will allow me to call their own files. Which will be stored in a database table and when you login to my site it will make a MySQL call and get that JSON in question.
But I appreciate the help.
Just got back from work and am trying to remember what I was working on before I left. I believe I was researching the 404.3 error and doing something with enabling IIS on my computer or something like that but I really don't want to leave myself open to hacking.
Any one familiar with Webmatrix3? Im thinking about asking on their forum but am trying to see if I can not solve my issues first. They most likely will know nothing about Construct any way.