Use better name for parser configuration option, fix API comment.

This commit is contained in:
Robert Lichtenberger
2025-03-21 07:25:37 +01:00
parent 5d1c789490
commit 1afd7cd6bc
4 changed files with 18 additions and 17 deletions
@@ -235,7 +235,7 @@ public class JSONArrayTest {
Map<String, Object> sub = new HashMap<String, Object>();
sub.put("nullKey", null);
list.add(sub);
JSONParserConfiguration parserConfiguration = new JSONParserConfiguration().withJavaNullAsJsonNull(true);
JSONParserConfiguration parserConfiguration = new JSONParserConfiguration().withUseNativeNulls(true);
JSONArray jsonArray = new JSONArray(list, parserConfiguration);
JSONObject subObject = jsonArray.getJSONObject(0);
assertTrue(subObject.has("nullKey"));