return result;
}
public static CustomField parseCustomField(JSONObject content)
throws JSONException {
final CustomField result = CustomFieldFactory.create(JsonInput.getInt(content, "id"));
result.setName(JsonInput.getStringOrNull(content, "name"));
if (!content.has("multiple"))
result.setValue(JsonInput.getStringOrNull(content, "value"));
else {
JSONArray tmp = JsonInput.getArrayOrNull(content, "value");
ArrayList<String> strings = new ArrayList<String>();
for (int i = 0; i < tmp.length(); i++) {
strings.add(String.valueOf(tmp.get(i)));
}
result.setValues(strings);
}
return result;
}