So I could reproduce writing duplicate files with a mixture of writeJSON and write
Not sure it is what happened here and with the alarm app though, but maybe it is related:
let set={"id":1,"test":2};
let sto=require("Storage");
sto.writeJSON("test.json",set);
sto.write("test.json","test123");
sto.list("test.json");
=[
"test.json",
"test.json"
]
>sto.read("test.json")
="test123"
>sto.readJSON("test.json")
Uncaught SyntaxError: Expecting a valid value, got ID
at line 1 col 8
test123
^
So both readand readJSON then only can read the latter file.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
So I could reproduce writing duplicate files with a mixture of
writeJSON
andwrite
Not sure it is what happened here and with the alarm app though, but maybe it is related:
So both
read
andreadJSON
then only can read the latter file.