I have been developing a Firefox add-on for one year.
My last update has been refused, because they want me to "store your objects/patterns in non-executable JSON files and load and parse via XHR or SDK API (if applicable), as in this example:"
var data = require('sdk/self').data;
var myJSON = JSON.parse(data.load('dir/file.json'));
I've always stored my data in JavaScript object initializers and never received even a warning.
The data in question is currently represented as one, or more, object literal/initializer expressions in a JavaScript files within my add-on. I am not obtaining this data from a source external to my add-on.
What is wrong with this way? Why should I change?
Since this refusal, my last approved version is "corrupted" and can't be downloaded.
myJSONwon't contain JSON, it'll be a reference to the object that you got after you parsed the JSON.JSON.parse(). Is that correct?