StelJsonParser.cpp   StelJsonParser.cpp 
skipping to change at line 207 skipping to change at line 207
QByteArray name; QByteArray name;
char c; char c;
while (getChar(&c)) while (getChar(&c))
{ {
switch (c) switch (c)
{ {
case '"': case '"':
return name; return name;
case '\\': case '\\':
{ {
getChar(&c); bool gotChar=getChar(&c);
if (!gotChar) {qWarning() << "cannot read fu
rther, error?"; continue;}
if (c=='b') c='\b'; if (c=='b') c='\b';
if (c=='f') c='\f'; if (c=='f') c='\f';
if (c=='n') c='\n'; if (c=='n') c='\n';
if (c=='r') c='\r'; if (c=='r') c='\r';
if (c=='t') c='\t'; if (c=='t') c='\t';
if (c=='u') {qWarning() << "don't support \\ uxxxx char"; continue;} if (c=='u') {qWarning() << "don't support \\ uxxxx char"; continue;}
} }
default: default:
name+=c; name+=c;
} }
skipping to change at line 280 skipping to change at line 281
{ {
// We've got an object (a tuple) // We've got an object (a tuple)
QVariantMap map; QVariantMap map;
if (skipAndConsumeChar('}')) if (skipAndConsumeChar('}'))
return map; return map;
for (;;) for (;;)
{ {
if (!skipAndConsumeChar('\"')) if (!skipAndConsumeChar('\"'))
{ {
char cc=0; char cc=0;
getChar(&cc); if (getChar(&cc))
throw std::runtime_error(qPrintable( throw std::runtime_error(qPr
QString("Expected '\"' at beginning of string, found: '%1' (ASCII %2)").arg intable(QString("Expected '\"' at beginning of string, found: '%1' (ASCII %
(cc).arg((int)(cc)))); 2)").arg(cc).arg((int)(cc))));
} }
const QByteArray& ar = readString(); const QByteArray& ar = readString();
const QString& key = QString::fromUtf8(ar.co nstData(), ar.size()); const QString& key = QString::fromUtf8(ar.co nstData(), ar.size());
if (!skipAndConsumeChar(':')) if (!skipAndConsumeChar(':'))
throw std::runtime_error(qPrintable( QString("Expected ':' after a member name: ")+key)); throw std::runtime_error(qPrintable( QString("Expected ':' after a member name: ")+key));
skipJson(); skipJson();
map.insert(key, parse()); map.insert(key, parse());
if (!skipAndConsumeChar(',')) if (!skipAndConsumeChar(','))
break; break;
 End of changes. 2 change blocks. 
5 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/