A sample with fastjson, a JSON library:
String s = Arrays.toString(new int[] { 1, 2, 3 });
Integer[] result = ((JSONArray) JSONArray.parse(s)).toArray(new Integer[] {});
Another sample with guava:
String s = Arrays.toString(new int[] { 1, 2, 3 });
Iterable<String> i = Splitter.on(",")
.trimResults(CharMatcher.WHITESPACE.or(CharMatcher.anyOf("[]"))).split(s);
Integer[] result = FluentIterable.from(i).transform(Ints.stringConverter())
.toArray(Integer.class);