1.List<String>转JsonString:
List<String> strList = new ArrayList<>();
法1:String str = JSONObject.toJSONString(strList);
str 存入的格式为:["xx1","xx2"]
法2:String str2 = strList .stream().collect(Collectors.joining(","));
str2存入格式为: "xx1,xx2"
2.JsonString转List<String>
String str = ["xx1","xx2"];
List<String> strList = JSON.parseArray(str, String.class);