【问题标题】:There are two types:String and List<Object> in JsonArray ,How to deal with Google Gson?JsonArray 中有两种类型:String 和 List<Object>,如何处理 Google Gson?
【发布时间】:2019-12-03 08:25:19
【问题描述】:

JSON 字符串:

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

【问题讨论】:

  • 无效的 json 字符串
  • 我的错!我说对了!

标签: java android json gson


【解决方案1】:

你必须使用Arraylist&lt;Arraylist&lt;Object&gt;&gt;,因为你有不同的类型。

【讨论】:

    猜你喜欢
    • 2019-12-01
    • 1970-01-01
    • 2018-02-16
    • 2023-04-07
    • 1970-01-01
    • 2019-05-21
    • 2023-03-15
    • 1970-01-01
    • 2018-09-22
    相关资源
    最近更新 更多