Deutsch   English   Français   Italiano  
<v2cjht$3b3om$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Malcolm McLean <malcolm.arthur.mclean@gmail.com>
Newsgroups: comp.lang.c
Subject: Add JSON, XML, CSV to Baby X resource compiler
Date: Sun, 19 May 2024 11:16:27 +0100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <v2cjht$3b3om$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 19 May 2024 12:16:30 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="defb02f1fe7ac73539faa2386bbec5c1";
	logging-data="3510038"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1//BG2QNod2iDzkyQiFGiuY436ho32M9wA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VVb2Wcl8Za2CwbYQbQVbDZ0yobY=
Content-Language: en-GB
Bytes: 2135

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