We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all-
I'm trying to save an optimized JSON file, and I'm using the following syntax with 'true' as the third parameter to tell it to save as optimized rather than pretty.
save(myJSON, 'my.json', true);
However, when this line runs, the file saves as my.json.true
rather than my.json
. Am I doing something wrong, or is this a bug?
Thanks!
Answers
My data is an array of frequency/amplitude pairs from an fft analysis of a sound event. The save works great without the 'true' parameter, it just saves it as a pretty format. I'll try the saveJSON() as well - thanks!
Unfortunately, saveJSON() returns the same pretty printed data. the
true
argument creates the .json.true extension as above.Better tell the devs about it here: https://github.com/processing/p5.js/issues
Thanks for posting the issue. I just submitted a pull request to fix.
Cross-reference: https://github.com/processing/p5.js/issues/567