后端嵌套list,ajax 如何存参,后端才能接到list里的数据

ajax 传参问题

后端domian CxffExamRecord 包含一个List
CxffExamRecord 可以正常接数据,但是List接不到数据,CxffExamRecordChild对象一直是空
前端怎么写 才能让和后端正常接数据

//CxffExamRecord 
    /** 考试记录子信息 */
    private List<CxffExamRecordChild> cxffExamRecordChildList;
//CxffExamRecordChild
  /** 试题id */
    @Excel(name = "试题id")
    private String stid;

    /** 题库id */
    @Excel(name = "题库id")
    private String tkid;

    /** 用户ID */
    @Excel(name = "用户ID")
    private String userid;

    /** 用户答案 */
    @Excel(name = "用户答案")
    private String uesranswer;


var cxffExamRecordChildList=[];
      var json= [];
      json.tkid =   tk;
      json.userAnswer =   userAw;
      cxffExamRecordChildList.push(json);

$.ajax({
            type: 'POST',
            url: "/cxff/record/add",
            data: {
                stid:stid,
                time:useTime,
                score:per,
                cxffExamRecordChildList:cxffExamRecordChildList
            },
            error: function (request) {
                return request;
            },
            success: function (res) {
                console.log(res);

            }
        });

改成这样试试看

var cxffExamRecordChildList = [];
var json = {
    stid: stid,
    tkid: tk,
    userid: userid,
    useranswer: userAw
};
cxffExamRecordChildList.push(json);

$.ajax({
    type: 'POST',
    url: "/cxff/record/add",
    data: {
        stid: stid,
        time: useTime,
        score: per,
        cxffExamRecordChildList: JSON.stringify(cxffExamRecordChildList)
    },
    error: function (request) {
        return request;
    },
    success: function (res) {
        console.log(res);
    }
});