Create a JSON String with null value.

suggest change

If you need to produce a JSON string with a value of null like this:


Then you have to use the special constant JSONObject.NULL.

Functioning example:

jsonObject.put("name", JSONObject.NULL);

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents