如何解析built_value库中的嵌套JSON

时间:2019-02-24 12:00:15

标签: json dart flutter

我正在尝试使用built_value库解析此JSON对象,我设法获得了基本响应

16
8.0
HackerRank is the best place to learn and practice coding!

我设法解析了从此有用的anwer

中发现的BaseResponse

因为我要最终得到一个像这样的对象

{
    "status": true,
    "message": "",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 30,
                "id_f": "D01"
            },
            {
                "id": 31,
                "id_f": "D02"
            },
        ],
        "first_page_url": "http://192.168.1.120:8000/api/requests/driver?page=1",
        "from": 1,
        "last_page": 2,
        "last_page_url": "http://192.168.1.120:8000/api/requests/driver?page=2",
        "next_page_url": "http://192.168.1.120:8000/api/requests/driver?page=2",
        "path": "http://192.168.1.120:8000/api/requests/driver",
        "per_page": 20,
        "prev_page_url": null,
        "to": 20,
        "total": 34
    }
}

有什么解决方案可以使用很棒的Built_value库吗?

0 个答案:

没有答案