How to set null value in org.json.JSONObject in java? I can of course read if the value is null using isNull - but it seems that when I put null, it just ignores me:
JSONObject o = new JSONObject(); o.put("key",null); o.isNull("key"); // returns true, buuuut... o.has("key"); // returns false o.isNull("somethingIHaventSetAtAll"); // also returns true, unfortunately
java json
BT Nov 28 '12 at 20:24 2012-11-28 20:24
source share