JSONObject json = new JSONObject(); json.put("state", "successful"); String strJson = json.toString();