The following code:
JSONObject obj = new JSONObject(); obj.put("name", "foo");
Returns the following error when compiling