Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

JSONObject, null values

$
0
0
As far as other code I've seen, and some validators I've used, null is a valid value. I have a server using jackson which is sending key/value pairs with null values, but I'm unable to add a key/value pair to my JSONObject with a null value.
Simple example:

JSONObject jo = new JSONObject();
jo.setString("isadded", "yes");
jo.setString("notadded", null);
println(jo);

Am I missing something?

Viewing all articles
Browse latest Browse all 1768

Trending Articles