@@ -454,7 +454,9 @@ bool Reader::readObject(Token& token) {
454
454
initialTokenOk = readToken (tokenName);
455
455
if (!initialTokenOk)
456
456
break ;
457
- if (tokenName.type_ == tokenObjectEnd && (name.empty () || features_.allowTrailingCommas_ )) // empty object or trailing comma
457
+ if (tokenName.type_ == tokenObjectEnd &&
458
+ (name.empty () ||
459
+ features_.allowTrailingCommas_ )) // empty object or trailing comma
458
460
return true ;
459
461
name.clear ();
460
462
if (tokenName.type_ == tokenString) {
@@ -505,7 +507,11 @@ bool Reader::readArray(Token& token) {
505
507
int index = 0 ;
506
508
for (;;) {
507
509
skipSpaces ();
508
- if (current_ != end_ && *current_ == ' ]' && (index == 0 || (features_.allowTrailingCommas_ && !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing comma
510
+ if (current_ != end_ && *current_ == ' ]' &&
511
+ (index == 0 ||
512
+ (features_.allowTrailingCommas_ &&
513
+ !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing
514
+ // comma
509
515
{
510
516
Token endArray;
511
517
readToken (endArray);
@@ -1424,7 +1430,9 @@ bool OurReader::readObject(Token& token) {
1424
1430
initialTokenOk = readToken (tokenName);
1425
1431
if (!initialTokenOk)
1426
1432
break ;
1427
- if (tokenName.type_ == tokenObjectEnd && (name.empty () || features_.allowTrailingCommas_ )) // empty object or trailing comma
1433
+ if (tokenName.type_ == tokenObjectEnd &&
1434
+ (name.empty () ||
1435
+ features_.allowTrailingCommas_ )) // empty object or trailing comma
1428
1436
return true ;
1429
1437
name.clear ();
1430
1438
if (tokenName.type_ == tokenString) {
@@ -1481,7 +1489,11 @@ bool OurReader::readArray(Token& token) {
1481
1489
int index = 0 ;
1482
1490
for (;;) {
1483
1491
skipSpaces ();
1484
- if (current_ != end_ && *current_ == ' ]' && (index == 0 || (features_.allowTrailingCommas_ && !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing comma
1492
+ if (current_ != end_ && *current_ == ' ]' &&
1493
+ (index == 0 ||
1494
+ (features_.allowTrailingCommas_ &&
1495
+ !features_.allowDroppedNullPlaceholders_ ))) // empty array or trailing
1496
+ // comma
1485
1497
{
1486
1498
Token endArray;
1487
1499
readToken (endArray);
0 commit comments