@@ -455,7 +455,9 @@ bool Reader::readObject(Token& token) {
455455 initialTokenOk = readToken (tokenName);
456456 if (!initialTokenOk)
457457 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
459461 return true ;
460462 name.clear ();
461463 if (tokenName.type_ == tokenString) {
@@ -506,7 +508,11 @@ bool Reader::readArray(Token& token) {
506508 int index = 0 ;
507509 for (;;) {
508510 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
510516 {
511517 Token endArray;
512518 readToken (endArray);
@@ -1440,7 +1446,9 @@ bool OurReader::readObject(Token& token) {
14401446 initialTokenOk = readToken (tokenName);
14411447 if (!initialTokenOk)
14421448 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
14441452 return true ;
14451453 name.clear ();
14461454 if (tokenName.type_ == tokenString) {
@@ -1497,7 +1505,11 @@ bool OurReader::readArray(Token& token) {
14971505 int index = 0 ;
14981506 for (;;) {
14991507 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
15011513 {
15021514 Token endArray;
15031515 readToken (endArray);
0 commit comments