Writing and Reading JSON files with QML
Hi, I'm upgrading my Tunings and Temperaments plugin to allow the user finer control over the tunings.
I'd like the user to be able to save their own tunings locally, for sharing and/or later re-use.
Ideally I'd like the saved files to be JSON, but that's not an absolute requirement.
Searching through the QML documentation I can see no obvious way to do this without also writing C++, which is a non-starter for a plugin.
Have I missed something, or should I turn this in to a feature request?
Comments
Making a JSON string should be possible using javascript, JSON.parse and JSON.stringify.
To write the file, you can use FileIO, see for example the ABC import plugin https://github.com/musescore/MuseScore/blob/2.3.2/share/plugins/abc_imp…
In reply to Making a JSON string should… by Nicolas
I'll give it a try, thanks!