for (int i = 0; i < params.length; i++) {
Class<?> type = types[i];
// json parser uses Double and Long by default
if (type == JSONObject.class) {
params[i] = new StringMap((JSONObject) params[i]);
} else if (type == Float.class || type == float.class) {
params[i] = TypeUtil.toFloat(params[i]);
} else if (type == Integer.class || type == int.class) {
params[i] = TypeUtil.toInt(params[i]);
} else if (type.isArray()) {