[Development] Json support for QtCore
xbenlau at gmail.com
Sun Dec 11 11:11:07 CET 2011
On Sun, Dec 11, 2011 at 8:31 AM, Robin Burchell <robin+qt at viroteck.net>wrote:
> On Sat, Dec 10, 2011 at 10:32 PM, <lars.knoll at nokia.com> wrote:
> > I've benchmarked parsing speed and compared to the qjson
> > (http://qjson.sourceforge.net/). It's around 7 times faster for the
> > test.json file included in the project (the test case used in qjson as
> > well).
> I'd be interested to see how your parser fares compared to girish's
> work (existing benchmark results, somewhat outdated probably, found at
> - those results at least look a lot better than 7 times faster, but
> they are also probably different test data.
> But, parser aside: in general terms, I do think I agree that
> converting to/from QVariant as an "API" isn' all that nice, so your
> approach is a nice alternative.
> I do think I'd like to see QDataStream operators on QJsonDocument,
> btw. sending json documents in binary form to/from files or sockets
> would be useful.
> Development mailing list
> Development at qt-project.org
A side chat about the stream operation. I have made a tiny project / class
to help to convert a non-QObject based class to QVariantMap , and vice
versa easily . So that it could be converted to JSON/XML/YAML by just
taking a further step.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development