[Development] Json support for QtCore

Andre Somers andre at familiesomers.nl
Sun Dec 11 17:33:29 CET 2011


Op 11-12-2011 15:55, lars.knoll at nokia.com schreef:
> The binary representation is optimized for fast reading. The binary
> format
> is relatively compact and stores the whole object in one blob.
>> Is this a standard binary format of JSON, or something of your own devise?
> It's something I wrote. I wanted it to be something that you can simply
> mmap from a file and use without ever having to parse anything to make
> saving and restoring of json objects as cheap as possible.
>
> The problem with bson is that it's a streaming format that still requires
> parsing and as such was unsuitable for some of the use cases I have.
>
I think I am missing something here. What is the use of this? I mean, if 
it is not JSON, then it is "just" some random binary format, right? How 
does that help with parsing and providing JSON when you are 
communicating with a webservice, for instance? I mean, it is cool to 
have a file format that is able to contain a lot of standard stuff and 
be quick about it, but I don't really see the connection with JSON, and 
calling it a binary format of JSON is confusing to me.

However, like I said, I guess I am missing something here. Could you 
explain what the relationship is between this binary format and the JSON 
format, and how it helps parsing & creating JSON?

André






More information about the Development mailing list