mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Allow to configure Java null handling.
This commit is contained in:
@@ -332,7 +332,7 @@ public class JSONObject {
|
||||
throw new NullPointerException("Null key.");
|
||||
}
|
||||
final Object value = e.getValue();
|
||||
if (value != null) {
|
||||
if (value != null || jsonParserConfiguration.isJavaNullAsJsonNull()) {
|
||||
testValidity(value);
|
||||
this.map.put(String.valueOf(e.getKey()), wrap(value, recursionDepth + 1, jsonParserConfiguration));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user