1

I'm trying to parse this JSON object using built_value library, I managed to get the base response

{
    "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
    }
}

I managed to parse the BaseResponse which I found out from this helpful anwer

Put I got stuck because I want to finally get an object like this

BaseResponse<PaginateResponse<BuiltList<Deliveries>>>

Is there any solution to do that with the awesome built_value library?

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.