Girish Ramakrishnan
2011-09-27 21:04:55 UTC
Hi,
determine which one we'll pick.
About V8, Qt is gonna use that right? I'm guessing V8 has it's own uber fast
json parser so why not make a qt layer for that..? Seems like that gives no
duplication and json in c++, everyone happy :)
AFAICT, v8's json parser is written in JavaScript. I don't think it's
a problem that it's not in C++, though. What I do think is a problem
is that apps now need to have v8 just to use JSON (maybe this is an
imaginary problem).
If I understood Thiago, he would prefer to 'wait and see which one
survives'. I would instead like us to choose one and provide an api
for JSON in qtbase, asap. Pretty much every project I work with needs
JSON these days. JSON implementation is quite trivial anyway (like
~200-300 lines max), so I don't see the need to have competing
implementations 'fight it out'.
Does anyone have a strong opinion on what API we should have for a
JSON parser in Qt? I quite like the qjson approach of just providing a
QVariant. QVariant conversion has a performance overhead but it's very
easy to work with and from what I have seen the big performance impact
is in the parsing phase and not when getting data out of the QVariant.
The alternate is a stream based API like the XML one but I think this
is just too cumbersome.
Girish
Hi,
http://gitorious.org/qjsonparser/qjsonparser.
Does V8 have it's own json parser that we can use?
That's why I said we have 5 different JSON parsers today and Darwin shouldJSON support is provided by many different implementations already. I
don't
think we can choose one right now. So we should simply list all the
available ones and apply the Darwin principle: standardise on the one
that survives.
Here's one I wrote based on QLALR and it's way faster than the (verydon't
think we can choose one right now. So we should simply list all the
available ones and apply the Darwin principle: standardise on the one
that survives.
http://gitorious.org/qjsonparser/qjsonparser.
Does V8 have it's own json parser that we can use?
determine which one we'll pick.
json parser so why not make a qt layer for that..? Seems like that gives no
duplication and json in c++, everyone happy :)
a problem that it's not in C++, though. What I do think is a problem
is that apps now need to have v8 just to use JSON (maybe this is an
imaginary problem).
If I understood Thiago, he would prefer to 'wait and see which one
survives'. I would instead like us to choose one and provide an api
for JSON in qtbase, asap. Pretty much every project I work with needs
JSON these days. JSON implementation is quite trivial anyway (like
~200-300 lines max), so I don't see the need to have competing
implementations 'fight it out'.
Does anyone have a strong opinion on what API we should have for a
JSON parser in Qt? I quite like the qjson approach of just providing a
QVariant. QVariant conversion has a performance overhead but it's very
easy to work with and from what I have seen the big performance impact
is in the parsing phase and not when getting data out of the QVariant.
The alternate is a stream based API like the XML one but I think this
is just too cumbersome.
Girish