Java JSON - Null-Ausnahme
Ich bin mit JSON Deserialisieren eines input-string enthält einen null
Wert für bestimmte hashmap Eigenschaft. Hat jemand eine Ahnung, warum diese exception tritt auf ? Ist es möglich, dass null
wird nicht akzeptiert als Wert Ist das irgendwie konfigurierbar ?
Eingangs-sample:
{"prop1":"val1", "prop2":123, "prop3":null}
stacktrace:
net.sf.json.JSONException: null object
at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2856)
at net.sf.json.JSONObject.isEmpty(JSONObject.java:2212)
Dank.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Für mich das arbeiten mit json-lib-2.3-jdk15:
Eigentlich die
null
Wert wird eine InstanzJSONNull
.