Java - JSON Null Exception
Posted
by user1112111
on Stack Overflow
See other posts from Stack Overflow
or by user1112111
Published on 2010-03-16T16:18:05Z
Indexed on
2010/03/16
16:21 UTC
Read the original article
Hit count: 461
Hi,
I'm using JSON to deserialize an input string that contains a null
value for certain hashmap property. Does anyone have any clue why this exception occurs ? Is it possible that null
is not accepted as a value Is this configurable somehow ?
input 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)
Thanks.
© Stack Overflow or respective owner