Skip to content

Commit 38d81f5

Browse files
committed
Fix outputting tuple subclasses in json encoder
1 parent 56b78ca commit 38d81f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/json/JSONEncoderBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ private void appendList(PJSONEncoder encoder, StringBuilder builder, PSequence l
304304
e.expectStopIteration(stopListIterationProfile);
305305
break;
306306
}
307-
if (first) {
307+
if (!first) {
308308
builder.append(encoder.itemSeparator);
309-
first = false;
310309
}
310+
first = false;
311311
appendListObj(encoder, builder, item);
312312
}
313313
}

0 commit comments

Comments
 (0)