public static void main(String... args) throws Exception {

        // test data
        final Instant[] testInstants = {
            Instant.EPOCH,
            Instant.now().truncatedTo(ChronoUnit.MILLIS),
            Instant.ofEpochSecond(Integer.MIN_VALUE),
            Instant.ofEpochSecond(Integer.MAX_VALUE),
            // amazingly, according to ISO 8601, everything before 1583 is a mess...
            Instant.parse("1583-01-01T00:00:00Z"),
            // and anything after 9999 is as well...
            Instant.parse("9999-12-31T23:59:59Z"),
        };

        withDatabase(jdbi -> {
            // create database table
            jdbi.inTransaction(th -> {
                th.execute("DROP TABLE IF EXISTS custom_sql");
                th.execute("CREATE TABLE custom_sql (t TIMESTAMP[])");
                return null;
            });

            // register the custom array type to map instant to timestamp
            jdbi.registerArrayType(Instant.class, "timestamp");

            CustomSqlObject dao = jdbi.onDemand(CustomSqlObject.class);

            // write data (with a sql object)
            dao.insertInstantArray(testInstants);

            // fetch results back
            List<Instant> result = dao.fetchInstantList();

            // display results
            result.forEach(r -> System.out.printf("%s%n", r));
        });
    }
Defines a custom SQL array type and maps it onto a database array column.
examples/src/main/java/org/jdbi/v3/examples/CustomSqlArrayType.java