如何使用Gson在Java中解析和使用HTTP响应内容

时间:2016-11-04 20:56:36

标签: java json parsing httpresponse

我正在尝试解析并通过类似于此的HTTP响应获取给我的输出,并且在一个名为'line'的字符串中。 (每次运行时响应内容都会改变)

{"needle":"opuwyxib"," haystack":["igrnevcp","ripfxjuv","amjctpsr","ucdpotrj","usqhrmvz","jblhmqgx","opuwyxib","mbhfylwt","ltkvhjsw","dhnpaurg","muyesbcg","etxmvzyd","chyfigmd","udskerov","ngoqzmve","ukeljaqw","dngqmtrz","xztpbjfs","zgdrcnbp","tkfivrld"]}

如何使用Gson提取它然后使用提取来找到针的索引?

0 个答案:

没有答案