You don't have a custom json object. it is simple string array in array so you should use ArrayList> class type as below.
Kotlin:
val model = Gson().fromJson(jsonString, ArrayList<ArrayList<String>>()::class.java)
Java:
ArrayList<ArrayList<String>> model = new Gson().fromJson(jsonString, new TypeToken<ArrayList<ArrayList<String>>>() {}.getType());
TypeToken
public class TypeToken<T> extends Object
Represents a generic type T.Java
doesn't yet provide a way to represent generic types, so this
class does. Forces clients to create a subclass of this class which
enables retrieval the type information even at runtime. For example,
to create a type literal for List<String>
, you can create an empty
anonymous inner class:
TypeToken<List<String>> list = new TypeToken<List<String>>() {};
This syntax cannot be used to create type literals that have wildcard
parameters, such as Class<?> or List<? extends CharSequence>
.