java.lang.IllegalStateException:应为 BEGIN_OBJECT,但在第 1 行为 STRING

java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1

我正在尝试在 java

中序列化下面的 JSON 数据
  [{
    "clear": "0",
    "default": ["123","234"],
    "mandatory": "1",
    "visible": "1"
}]

我的序列化程序 Class 如下所示,

public class HandleConfig{
@SerializedName("visible")
private  int visible;
@SerializedName("clear")
private  int clear;
@SerializedName("mandatory")
private int mandatory;
@SerializedName("default")
private JSONArray def;

// getter and setter methods here...

}

//调用序列化器

Gson gson1 = new Gson();
Type collectionType1 = new TypeToken<List<HandleConfig>>(){}.getType();
List<HandleConfig> handleConfigurations = gson1.fromJson(object.toString(), collectionType1);

// 错误

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 267 path $[0].default

我已经参考了各种堆栈溢出答案.. 并且知道这背后的原因是序列化程序期望“默认”是下面的格式

 "default":[{ "id":123},{"id":124}]

但现在我的问题是如何将 "defalut":["123","1234"] 序列化为 JSON 数组而不产生任何错误,

提前致谢..:)

请使用这个进行解析:

List<String> def 而不是 JSONArray def