Sujet : Add JSON, XML, CSV to Baby X resource compiler
De : malcolm.arthur.mclean (at) *nospam* gmail.com (Malcolm McLean)
Groupes : comp.lang.cDate : 19. May 2024, 11:16:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v2cjht$3b3om$1@dont-email.me>
User-Agent : Mozilla Thunderbird
The Baby X resource compiler takes data - fonts, images, audio, strings - and converts them into C source so that they can be read by C programs without relying on external data files.
An obvious extension is to take in structured data. Adding SQL and querying a database would unfortuately mean extending the program so that it could only run on a large machine with a SQL server running, and isn't really a viable proposition. However JSON, XML, and CSV are commonly used to pass small to medium amounts of data about.
I've made a start on supporting CSV with the "<dataframe>" tag. CSV data is tabular and two dimensional, and lends itself to an arrray of simple structures. JSON And XML can of course represent more complex data, with hierarchy. The dataframe tag is still very experimental. I've never used it for anything practical.
So what would be the best approach to putting in JSON and XML support?
The project is here is you are not familiar with it. It's on github.
https://github.com/MalcolmMcLean/babyxrc-- Check out Basic Algorithms and my other books:https://www.lulu.com/spotlight/bgy1mm