03-03-2023, 07:22 AM
(03-03-2023, 02:59 AM)Balderdash Wrote: I really do not think you see how difficult managing JSON with QB64 will be. Sure, some poor soul might write up some 10,000 line library from scratch for doing it but the user experience will be absolute garbage. I've managed to use a bit of a JSON library in QB64 before but it was just a crappy experience and made me regret wasting the time on it.
It has probably been attempted many times with XML which could be terrible depending on the implementation. I have been able to kludge simple programs that fabricated an SVG file. It had to be "Plain SVG" format saved by Inkscape, not "sodipodi" because I didn't want to get too much into those details. As a result I was able to do only simple line-drawing stuff. No problem, I created programs to do some gradients difficult to do inside that application. Also did a parser for XRNI and XRNS formats to load into RENOISE music-creation application. Each one is a ZIP file which contains an XML file and related FLAC or WAV files which are the samples used in the instrument or in the song. There was a significant difference in the document format for the song between v1.9 and v2.8 of RENOISE. In the later program version it was better most of the time to use the Lua scripting device inside that program to fiddle around with pattern (like triggering MIDI notes and their attributes) data.
Also I've tried to write a random-preset generator worth sharing for Zynaddsubfx, focusing on only one generator, first on the "additive" synth, and then on the "sub" synth which didn't have as many features. It was quite easy to make the "sub" synth sound horrible. I liked the results with the additive synth although the triggered sounds were samey. The XML required for that was a fantastic mess and had to follow along closely with where the program expected to find certain fields and sections. Also, the program had to be instructed to save a XIZ file (don't remember suffix now) entirely in text format, because saving to ZIP-compressed or other binary document was possible.
I know less about JSON, only that thing about quoting Kanye West LOL. But some scripts that I saw look much simpler than anything XML. It looks like a bunch of records being initialized here and there because some fields are records, or some other data item which requires special treatment (like the "CDATA" block of XML). I'd take that readability any day over XML.