public static <T> T[] deepCopy(T[] array) {
        val mapper = new ObjectMapper();
        // per https://stackoverflow.com/questions/6349421/how-to-use-jackson-to-deserialise-an-array-of-objects
        // per https://stackoverflow.com/questions/49903859/deep-copy-using-jackson-string-or-jsonnode
        val tb = new TokenBuffer(mapper, false);
        try {
            mapper.writeValue(tb, array);
            return (T[]) mapper.readValue(tb.asParser(), array.getClass());
        } catch (IOException e) {
            return null;
        }
    }
<p>deepCopy.</p>

@param array an array of T[] objects
@param <T> a T class
@return an array of T[] objects
pac4j-oauth/src/main/java/org/pac4j/oauth/profile/linkedin2/LinkedIn2ProfilePicture.java