work7z/CodeGen

JSON转Model 报错Cannot read properties of undefined (reading 'fieldName')

Closed this issue · 2 comments

web版1.6.8
json内容:

{
    "data": [
        {
            "airdate": "2022-09-29",
            "name": "1",
            "name_cn": "1",
            "duration": "00:23:40",
            "desc": "1",
            "ep": 25,
            "id": 1073368,
            "subject_id": 326895,
            "comment": 19,
            "type": 0,
            "disc": 0,
            "duration_seconds": 1420,
            "sort": 1
        }
    ],
  "total": 25,
  "limit": 100,
  "offset": 0
}

结果
image


把json里的sort字段去掉就能成功

{
    "data": [
        {
            "airdate": "2022-09-29",
            "name": "1",
            "name_cn": "1",
            "duration": "00:23:40",
            "desc": "1",
            "ep": 25,
            "id": 1073368,
            "subject_id": 326895,
            "comment": 19,
            "type": 0,
            "disc": 0,
            "duration_seconds": 1420
        }
    ],
  "total": 25,
  "limit": 100,
  "offset": 0
}

结果
image

您好,此问题已经修复好了,请升级到v1.6.81版本重新尝试哈。

这个问题应该是由于sort被判断为函数,导致一些空指针问题,我们已经重新改正了