Malcolm McLean
2024-05-19 10:16:27 UTC
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
- 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
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm