Android, IOS list shows confusion

Today, my buddy of Android and IOS told me that the data structure given to him is very difficult to implement. I"m a little confused! Why this kind of data structure is so difficult to achieve this style layout, I hope Android, IOS god to answer!

< H1 > this is the front-end style < / H1 >

< H1 > this is the data structure I gave < / H1 >
{
    "status":1,
    "msg":"",
    "data":[
        {
            "id":1,
            "name":"",
            "son":[
                {
                    "id":1,
                    "name":"",
                    "cate_id":1
                },
                {
                    "id":2,
                    "name":"",
                    "cate_id":1
                },
                {
                    "id":3,
                    "name":"",
                    "cate_id":1
                },
                {
                    "id":4,
                    "name":"",
                    "cate_id":1
                },
                {
                    "id":5,
                    "name":"",
                    "cate_id":1
                },
                {
                    "id":6,
                    "name":"",
                    "cate_id":1
                }
            ]
        },
        {
            "id":2,
            "name":"",
            "son":[
                {
                    "id":7,
                    "name":"",
                    "cate_id":2
                }
            ]
        },
        {
            "id":3,
            "name":"",
            "son":[
                {
                    "id":8,
                    "name":"",
                    "cate_id":3
                },
                {
                    "id":9,
                    "name":"",
                    "cate_id":3
                }
            ]
        },
        {
            "id":4,
            "name":"",
            "son":[
                {
                    "id":10,
                    "name":"",
                    "cate_id":4
                },
                {
                    "id":11,
                    "name":"",
                    "cate_id":4
                },
                {
                    "id":12,
                    "name":"",
                    "cate_id":4
                },
                {
                    "id":13,
                    "name":"",
                    "cate_id":4
                }
            ]
        }
    ]
}
May.15,2021

although I have never done mobile, I only write vue
, but in terms of this page layout, I think the data structure you give is appropriate


I do android, and I don't find any major problems with the data


I do both front and rear, and the data structure you give seems to be fine.
in fact, your problem is communication, front-end and back-end should maintain close communication. Identify the needs and limitations of both sides.
the point of communication should be:
1, where does the front end find it difficult to achieve?
2, why does the front end find it difficult to implement here?
3, is the data provided by the backend incomplete or incorrect?
4, is the implementation of front-end understanding inconsistent with that of back-end understanding?

finally, contract test find out. The contract test is to verify that the Provider of the service interacts with the Consumer of the service in the desired way.


iOS development. Personally, I don't think there is any problem with this data structure, and the implementation is very easy

.
Menu