Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Richard Gerd Kuesters
LOL :) yeah, well, json can be tricky sometimes ... but between tecnologies (c++ to javascript or anything else), we must be kinda "purist" when exchanging data ... you'll never know how the other side will work, and some optimizations can break stuff. one silly example is those who, to compa

Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Joerg Bornemann
On 19-Feb-14 16:52, Joerg Bornemann wrote: > On 19-Feb-14 16:51, Joerg Bornemann wrote: > >> It could be even more compact by omitting the double quotes on the right >> side of the colon, iff the string forms a valid JS identifier. > > on the *left* side, moron And apparently that's only true for

Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Joerg Bornemann
On 19-Feb-14 16:51, Joerg Bornemann wrote: > It could be even more compact by omitting the double quotes on the right > side of the colon, iff the string forms a valid JS identifier. on the *left* side, moron ___ Development mailing list Development@qt-

Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Joerg Bornemann
On 19-Feb-14 15:39, Richard Gerd Kuesters wrote: > "{"foo": "bar","num": 1}" It could be even more compact by omitting the double quotes on the right side of the colon, iff the string forms a valid JS identifier. BR, Joerg ___ Development mailing li

[Development] QJsonDocument Compact output

2014-02-19 Thread Richard Gerd Kuesters
Hello all! I have a question about QJsonDocument, specially in the "Compact" format. To illustrate better, first the code and its output: int main() { QJsonDocument qjd; QJsonObject qjo; qjo.insert("foo", QJsonValue(QString("bar"))); qjo.insert("num", QJsonValue(1)); qjd.s

Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Richard Gerd Kuesters
-project.org] On Behalf Of Richard Gerd Kuesters Sent: 19 February 2014 16:40 To: development@qt-project.org Subject: [Development] QJsonDocument Compact output Hello all! I have a question about QJsonDocument, specially in the "Compact" format. To illustrate better, first the code and

Re: [Development] QJsonDocument Compact output

2014-02-19 Thread Knight Andrew
Subject: [Development] QJsonDocument Compact output Hello all! I have a question about QJsonDocument, specially in the "Compact" format. To illustrate better, first the code and its output: int main() {     QJsonDocument qjd;     QJsonObject qjo;     qjo.insert("foo", QJs