首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用GSON或任何其他序列化程序将其解析为POJO模型

如何使用GSON或任何其他序列化程序将其解析为POJO模型
EN

Stack Overflow用户
提问于 2020-09-22 22:50:30
回答 1查看 19关注 0票数 0

谁能告诉我一种使用GSON将此响应解析为Java POJO模型的方法?我不确定如何为此创建POJO。我是Java新手。因此,任何帮助都将不胜感激。我确实尝试过http://jsonviewer.stack.hu/#,我可以看到数据,但它没有返回POJO模型。

代码语言:javascript
复制
{
"data": {
    "help_data": [{
            "Help with delivery": [{
                    "Qus": "Estimating lastmile time",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                },
                {
                    "Qus": "Task not close",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                }
            ]
        },
        {
            "General issues": [{
                    "Qus": "Estimating lastmile time",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                },
                {
                    "Qus": "Batching",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                }
            ]
        },
        {
            "Legal Terms & Contitions": [{
                    "Qus": "Estimating lastmile time",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                },
                {
                    "Qus": "Batching",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                }
            ]
        },
        {
            "FAQs": [{
                    "Qus": "Estimating lastmile time",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                },
                {
                    "Qus": "Batching",
                    "Ans": "is simply dummy text of the printing and typesetting industry"
                }
            ]
        }
    ]
  }
}
EN

回答 1

Stack Overflow用户

发布于 2020-09-22 23:25:53

我强烈推荐http://www.jsonschema2pojo.org/。确保选择JSON作为源类型。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64012290

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档