@Override public String parse(JSONObject jsonObject) throws JSONException { return JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); } }
@Override public String parse(JSONObject jsonObject) throws JSONException { return JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); } }
@Override public String parse(JSONObject jsonObject) throws JSONException { return JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); } }
@Override public String parse(JSONObject jsonObject) throws JSONException { return JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); } }
@Override public Double parse(JSONObject jsonObject) throws JSONException { final String s = JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); if (s == null) { return null; } try { return Double.parseDouble(s); } catch (NumberFormatException e) { throw new JSONException("[" + s + "] is not a valid floating point number"); } } }
@Override public Double parse(JSONObject jsonObject) throws JSONException { final String s = JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); if (s == null) { return null; } try { return Double.parseDouble(s); } catch (NumberFormatException e) { throw new JSONException("[" + s + "] is not a valid floating point number"); } } }
@Override public Double parse(JSONObject jsonObject) throws JSONException { final String s = JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); if (s == null) { return null; } try { return Double.parseDouble(s); } catch (NumberFormatException e) { throw new JSONException("[" + s + "] is not a valid floating point number"); } } }
@Override public Double parse(JSONObject jsonObject) throws JSONException { final String s = JsonParseUtil.getNullableString(jsonObject, VALUE_ATTRIBUTE); if (s == null) { return null; } try { return Double.parseDouble(s); } catch (NumberFormatException e) { throw new JSONException("[" + s + "] is not a valid floating point number"); } } }
@Override public ChangelogItem parse(JSONObject json) throws JSONException { final String fieldTypeStr = JsonParseUtil.getNestedString(json, "fieldtype"); final ChangelogItem.FieldType fieldType; if ("jira".equalsIgnoreCase(fieldTypeStr)) { fieldType = ChangelogItem.FieldType.JIRA; } else if ("custom".equalsIgnoreCase(fieldTypeStr)) { fieldType = ChangelogItem.FieldType.CUSTOM; } else { throw new JSONException("[" + fieldTypeStr + "] does not represent a valid field type. Expected [jira] or [custom]."); } final String field = JsonParseUtil.getNestedString(json, "field"); final String from = JsonParseUtil.getNullableString(json, "from"); final String fromString = JsonParseUtil.getNullableString(json, "fromString"); final String to = JsonParseUtil.getNullableString(json, "to"); final String toString = JsonParseUtil.getNullableString(json, "toString"); return new ChangelogItem(fieldType, field, from, fromString, to, toString); } }
@Override public ChangelogItem parse(JSONObject json) throws JSONException { final String fieldTypeStr = JsonParseUtil.getNestedString(json, "fieldtype"); final FieldType fieldType; if ("jira".equalsIgnoreCase(fieldTypeStr)) { fieldType = FieldType.JIRA; } else if ("custom".equalsIgnoreCase(fieldTypeStr)) { fieldType = FieldType.CUSTOM; } else { throw new JSONException("[" + fieldTypeStr + "] does not represent a valid field type. Expected [jira] or [custom]."); } final String field = JsonParseUtil.getNestedString(json, "field"); final String from = JsonParseUtil.getNullableString(json, "from"); final String fromString = JsonParseUtil.getNullableString(json, "fromString"); final String to = JsonParseUtil.getNullableString(json, "to"); final String toString = JsonParseUtil.getNullableString(json, "toString"); return new ChangelogItem(fieldType, field, from, fromString, to, toString); } }
@Override public ChangelogItem parse(JSONObject json) throws JSONException { final String fieldTypeStr = JsonParseUtil.getNestedString(json, "fieldtype"); final ChangelogItem.FieldType fieldType; if ("jira".equalsIgnoreCase(fieldTypeStr)) { fieldType = ChangelogItem.FieldType.JIRA; } else if ("custom".equalsIgnoreCase(fieldTypeStr)) { fieldType = ChangelogItem.FieldType.CUSTOM; } else { throw new JSONException("[" + fieldTypeStr + "] does not represent a valid field type. Expected [jira] or [custom]."); } final String field = JsonParseUtil.getNestedString(json, "field"); final String from = JsonParseUtil.getNullableString(json, "from"); final String fromString = JsonParseUtil.getNullableString(json, "fromString"); final String to = JsonParseUtil.getNullableString(json, "to"); final String toString = JsonParseUtil.getNullableString(json, "toString"); return new ChangelogItem(fieldType, field, from, fromString, to, toString); } }
@Override public ChangelogItem parse(JSONObject json) throws JSONException { final String fieldTypeStr = JsonParseUtil.getNestedString(json, "fieldtype"); final FieldType fieldType; if ("jira".equalsIgnoreCase(fieldTypeStr)) { fieldType = FieldType.JIRA; } else if ("custom".equalsIgnoreCase(fieldTypeStr)) { fieldType = FieldType.CUSTOM; } else { throw new JSONException("[" + fieldTypeStr + "] does not represent a valid field type. Expected [jira] or [custom]."); } final String field = JsonParseUtil.getNestedString(json, "field"); final String from = JsonParseUtil.getNullableString(json, "from"); final String fromString = JsonParseUtil.getNullableString(json, "fromString"); final String to = JsonParseUtil.getNullableString(json, "to"); final String toString = JsonParseUtil.getNullableString(json, "toString"); return new ChangelogItem(fieldType, field, from, fromString, to, toString); } }