I’m attempting to save some data but i’m getting the following error:
XML Parsing Error: syntax error
Location: file:///path/JS/Domino/data/test.json
Line Number 1, Column 1:
(there’s nothing after de colon)
I tried to debug this in the firefox console the following way (the variable’s name is pieces)
saveJSON(pieces, ‘save.json’) // correctly prompts save and creates file
// opening the file on firefox reveals that the file was saved as a proper JSON object
loadJSON(‘save.json’) // error happens
I verified that the path is correct and tried saving a JSON.stringify object and using loadStrings but got the same result.
you should upload the file like to /data/ or /assets/ for your online account,
or use something like DROP ( a window what expects you upload (drag/drop) a file interactively )
I run an offline project and open the html file in firefox and usually I have no problem.
I am using a 2015 MBP.
I’m saving and loading the data locally.
also the saving by js. to HD is not possible,
what you do is you download it interactively
( means you save it manually to HD, and also you can upload it manually … )
but never should JS read and write automatically from/to your drive
Just numbers… from what i can tell saveJSON() works as it is supposed to (otherwise maybe firefox would not be able to load the project) and it’s loadJSON() the one not working properly