You can use Eval.me like so:
String[] f = Eval.me( d )*.toString()
Or
int[] i = Eval.me( d )
Be careful though, as if this String is entered by a third party, it could do nasty things and is a huge security risk... To get round that, you'd need to parse it yourself with something like:
def simplisticParse( String input, Class requiredType ) {
input.dropWhile { it != '[' }
.drop( 1 )
.takeWhile { it != ']' }
.split( ',' )*.asType( requiredType )
}
String[] s = simplisticParse( d, String )
int[] i = simplisticParse( d, Integer )