@@ -455,7 +455,9 @@ bool Reader::readObject(Token& token) {
455
455
initialTokenOk = readToken (tokenName);
456
456
if (!initialTokenOk)
457
457
break ;
458
- if (tokenName.type_ == tokenObjectEnd && (name.empty () || features_.allowTrailingCommas_ )) // empty object or trailing comma
458
+ if (tokenName.type_ == tokenObjectEnd &&
459
+ (name.empty () ||
460
+ features_.allowTrailingCommas_ )) // empty object or trailing comma
459
461
return true ;
460
462
name.clear ();
461
463
if (tokenName.type_ == tokenString) {
@@ -506,7 +508,11 @@ bool Reader::readArray(Token& token) {
506
508
int index = 0 ;
507
509
for (;;) {
508
510
skipSpaces ();
509
- if (current_ != end_ && *current_ == ' ]' && (index == 0 || (features_.allowTrailingCommas_ && !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing comma
511
+ if (current_ != end_ && *current_ == ' ]' &&
512
+ (index == 0 ||
513
+ (features_.allowTrailingCommas_ &&
514
+ !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing
515
+ // comma
510
516
{
511
517
Token endArray;
512
518
readToken (endArray);
@@ -1440,7 +1446,9 @@ bool OurReader::readObject(Token& token) {
1440
1446
initialTokenOk = readToken (tokenName);
1441
1447
if (!initialTokenOk)
1442
1448
break ;
1443
- if (tokenName.type_ == tokenObjectEnd && (name.empty () || features_.allowTrailingCommas_ )) // empty object or trailing comma
1449
+ if (tokenName.type_ == tokenObjectEnd &&
1450
+ (name.empty () ||
1451
+ features_.allowTrailingCommas_ )) // empty object or trailing comma
1444
1452
return true ;
1445
1453
name.clear ();
1446
1454
if (tokenName.type_ == tokenString) {
@@ -1497,7 +1505,11 @@ bool OurReader::readArray(Token& token) {
1497
1505
int index = 0 ;
1498
1506
for (;;) {
1499
1507
skipSpaces ();
1500
- if (current_ != end_ && *current_ == ' ]' && (index == 0 || (features_.allowTrailingCommas_ && !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing comma
1508
+ if (current_ != end_ && *current_ == ' ]' &&
1509
+ (index == 0 ||
1510
+ (features_.allowTrailingCommas_ &&
1511
+ !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing
1512
+ // comma
1501
1513
{
1502
1514
Token endArray;
1503
1515
readToken (endArray);
0 commit comments