We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am loading a JSON file from my processing sketch. This works fine, except when I export the sketch as an application. I also noted that the "data" folder is not packed with the exported application - so at first I thought that was the cause of the error. But even when copying the "data" folder to the same directory as the .app file, the JSON is still not loaded.
My code: moviedata = loadJSONArray("data.json");
Answers
You are not telling us what version of Processing you are using, on what system.
On Windows 7, using Processing 2.1.1 (32-bit), I added a line like
JSONObject json = loadJSONObject("Test.json");
to a test sketch, and I exported it.I got a data folder in the application.windows32 folder, and when I ran it, the file was loaded OK.