I've been trying to convert a String like this: "[1,2,3]" to an ArrayList in Java. What I tried so far is to use GSon library to convert the String mentioned above to List using:
- Gson - convert from Json to a typed ArrayList<T>
- Convert Gson Array to Arraylist
- Parsing JSON array into java.util.List with Gson
but it ends with an exception (I can provide more details if needed). The first question should be actually if it's a good approach to achieve such a transformation?