public Object[] parseObjectList(final GremlinParser.GenericCollectionLiteralContext collectionLiteral) {
        if (collectionLiteral == null || collectionLiteral.genericLiteral() == null) {
            return new Object[0];
        }
        return collectionLiteral.genericLiteral()
                .stream()
                .filter(Objects::nonNull)
                .map(antlr.genericVisitor::visitGenericLiteral)
                .toArray(Object[]::new);
    }
Parse a generic literal list, and return an object array
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GenericLiteralVisitor.java