IOS says you can't parse such a JSON?

topic description

the returned json format is as follows

{
    "status": 1,
    "content": "get seats info successfully",
    "data": {
        "seats": {
            "1": {
                "nickname": "salamander",
                "avatar": "*******************",
                "uid": 5464
            },
            "3": {
                "nickname": "coopk",
                "avatar": "***********************",
                "uid": 54645645
            }
        }
    }
}

he said that the data in seats cannot be parsed with numbers like 1,3. Please consult everyone

.

can be parsed if it does not exist. And'1' is not a number, this is the string'1'.


to see this, there is a guess.
iOS side uses some json to transfer to some components of the class,
, but the general class attribute name can not directly use numbers, so although your this is a standard json, when it is converted to the corresponding class object, it is unable to parse the 1 and 3.
it is really troublesome to use json in some languages, such as


json key can only be a string

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e52749-43c90.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e52749-43c90.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?