@Override public JSONObject generate(final UserInput user) throws JSONException { return new JSONObject() .putOpt("key", user.getKey()) .putOpt("name", user.getName()) .putOpt("password", user.getPassword()) .putOpt("emailAddress", user.getEmailAddress()) .putOpt("displayName", user.getDisplayName()) .putOpt("notification", user.getNotification()) .putOpt("applicationKeys", new JSONArray(user.getApplicationKeys())); } }