use JSONObject.NULL for null values so that they appear explicitly in the json