Skip to content

Commit 841d7c1

Browse files
authored
Update JsonArrayBuilderEx.java
1 parent 3ed997f commit 841d7c1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

json/jsonp/JsonArrayBuilderEx.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static void main(String[] args) {
2525
ab.add(ob);
2626
});
2727

28-
28+
var jsonArray = ab.build();
29+
2930
var config = new HashMap<String, Boolean>();
3031
config.put(JsonGenerator.PRETTY_PRINTING, true);
3132

@@ -34,7 +35,7 @@ public static void main(String[] args) {
3435

3536
try (var jsonWriter = jwf.createWriter(sw)) {
3637

37-
jsonWriter.writeArray(ab.build());
38+
jsonWriter.writeArray(jsonArray);
3839

3940
System.out.println(sw);
4041
}

0 commit comments

Comments
 (0)