简体   繁体   中英

There are two types:String and List<Object> in JsonArray ,How to deal with Google Gson?

JSON string:

{
    "vcardArray": [
        "vcard",
        [
            [
                "version",
                {},
                "text",
                "4.0"
            ],
            [
                "fn",
                {},
                "text",
                "Focus IP, dba AppDetex"
            ]
        ]
    ]
}

你必须使用Arraylist<Arraylist<Object>>因为你有不同的类型。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM