@Nullable
    @Override
    @SuppressWarnings("UseOfObsoleteDateTimeApi")
    public String convertObject(@Nullable Object value) {
        if (value == null) {
            return null;
        }

        // Try the types that appears more often first.
        if (value instanceof CharSequence ||
            value instanceof Number ||
            value instanceof MediaType) {
            return value.toString();
        }

        if (value instanceof Instant) {
            return DateFormatter.format(new Date(((Instant) value).toEpochMilli()));
        }

        if (value instanceof TemporalAccessor) {
            return DateFormatter.format(new Date(Instant.from((TemporalAccessor) value).toEpochMilli()));
        }

        if (value instanceof CacheControl) {
            return ((CacheControl) value).asHeaderValue();
        }

        if (value instanceof ContentDisposition) {
            return ((ContentDisposition) value).asHeaderValue();
        }

        // Obsolete types.
        if (value instanceof Date) {
            return DateFormatter.format((Date) value);
        }

        if (value instanceof Calendar) {
            return DateFormatter.format(((Calendar) value).getTime());
        }

        return value.toString();
    }
Converts to/from native types, general {@link Object}, and {@link CharSequence}s.
core/src/main/java/com/linecorp/armeria/common/StringValueConverter.java