JSON.parse or parseJSON
-
Is there a way to convert a string to JSON? If not, could we get one?
-
@d-healey You can write it to a file, then load it back with File.loadFileFromObject(). Or if you don't want to do the equivalent of printing out an email and then scan it to send a PDF because you don't know the Export to PDF function, you can add a wrapper around the JUCE function
JSON::parse
The Javascript standard seems to be
JSON.parse()
, but I don't want to add a API class just for that single method, so we could add it to the String class?var x = "1234"; var xAsObj = x.parseAsJSON(); // This is already possible var xAsObjAsText = trace(xAsObj);
-
@christoph-hart Sounds good to me. I'll add it to the API. Thanks!
-
-
@d-healey Nice one.
-
please add this to the API in HISE and the docs. this is great.
-
@aaronventure bump