我如何在swift3中提取json数组?

时间:2019-05-15 21:35:13

标签: ios json swift

我有Json Like:

"feeds": [
    {
        "user_id": "229",
        "username": "reem",
        "name": "reem",
        "isVerified": "0",
        "post": {
            "postId": "570",
            "type": "1",
            "content": "reem-4658-46512-229.png",
            "description": "",
            "bgcolor": "0",
            "cityname": "usa",
            "latitude": "44.02396467514336",
            "longitude": "26.075751995667815",
            "creation": "2019-05-12 20:01:05",
            "isLiked": 0,
            "isdisLiked": 0,
            "likes": 0,
            "shares": "0",
            "audience": "0",
            "isPostFollowed": 0,
            "comments": "1",
            "isShared": "0",
            "shareId": "0",
            "sharedPostId": "0"
        }
    },
    {
        "user_id": "228",
        "username": "fady",
        "name": "fady",
        "isVerified": "0",
        "post": {
            "postId": "569",
            "type": "0",
            "content": "",
            "description": "Thanks",
            "bgcolor": "-10453621",
            "cityname": "usa",
            "latitude": "26.07594792265445",
            "longitude": "44.023808436468244",
            "creation": "2019-05-10 16:29:08",
            "isLiked": "0",
            "isdisLiked": "1",
            "likes": -1,
            "shares": "0",
            "audience": "0",
            "isPostFollowed": 0,
            "comments": "4",
            "isShared": "0",
            "shareId": "0",
            "sharedPostId": "0"
        }
    },
    {
        "user_id": "228",
        "username": "aaa",
        "name": "aaaa",
        "isVerified": "0",
        "post": {
            "postId": "568",
            "type": "5",
            "content": "ahmed-9591-2745-228.mp3",
            "description": "",
            "bgcolor": "-16121",
            "cityname": "usa",
            "latitude": "44.023831570521",
            "longitude": "26.07576268259436",
            "creation": "2019-05-10 16:28:39",
            "isLiked": 0,
            "isdisLiked": 0,
            "likes": 0,
            "shares": "0",
            "audience": "0",
            "isPostFollowed": 0,
            "comments": "1",
            "isShared": "0",
            "shareId": "0",
            "sharedPostId": "0"
        }
    },

,我想提取该json,但遇到这些问题: https://imgur.com/WZk2f5V

0 个答案:

没有答案