D styled data format, Json failed

Lutger lutger.blijdestijn at gmail.com
Mon May 4 23:31:46 PDT 2009


Saaa wrote:

> 
> I looked at the JSON format and it seems very inefficient at loading 
arrays 
> as it isn't limited to one type per array.
> This is nice when you want to save a small array with different typed 
> elements but for my purposes this is kind of a performance problem.
> 
> This is why I will try and get suggestions again about the D-styled format 
I 
> tried to suggest a few threads ago :)
> 
> Let me suggest a simple example:
> (Please tell me when something isn't obvious :)
> 

I guess you will have to write this one yourself, it will be to D what JSON 
is to javascript ;)

I wonder how much of an performance improvement you will get though when 
loading data at runtime. You still have to parse and check everything since 
it remains a text based format. 

I know of one other solution but that's again not available for D: google 
protobuf: http://code.google.com/p/protobuf/
This uses a text-based format for describing the structure of the data, but 
the actual data can be in an optimized binary format.






More information about the Digitalmars-d-learn mailing list