mybaits-plus json 的List<某obj>转换报错:com.alibaba.fastjson.JSONException: syntax error, expect {, actual true, pos 1, fastjson-version 1.2.73

    com.alibaba.fastjson.JSONException: syntax error, expect {, actual true, pos 1, fastjson-version 1.2.73


@TableField(typeHandler = FastjsonTypeHandler.class):JSON自动转换只针对List<String> List<Integer> ...

解决:

    public List<Di> getDi() {
        return di!=null? JSONArray.parseArray(di.toString(),Di.class):null;
    }

里面某obj 

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }

 

posted on 2021-12-27 10:24  Honey_Badger  阅读(453)  评论(0编辑  收藏  举报

导航

github