java - Android:合并 JSON 和 HashMap 数据

标签 java android json arraylist hashmap

我有来自 facebook 的 JSON 数据:

String response = facebook.request("me/friends?fields=username",bundle,"GET");

以及来自用户联系人的数据:

ArrayList<HashMap<String, String>> data = getContacts();

我希望迭代响应数据。如何才能最有效地做到这一点?

最佳答案

我建议您阅读这个很棒的教程:

http://www.vogella.com/articles/AndroidJSON/article.html

虽然我更喜欢使用 Jackson 库。这是一个教程:

http://wiki.fasterxml.com/JacksonInFiveMinutes

如果你懂西类牙语,可以在androcode.es找到我写的一些关于JSON的教程。

关于java - Android:合并 JSON 和 HashMap 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12248916/

相关文章:

java - 大数据的高效正则表达式,如果一个字符串包含一个词

java - 制作系统托盘应用程序的有效方法

android - UITabBar : iOS and Android

Android服务不显示日志?

android - 如何从 GenyMotion 中删除 Google Play 服务?

iphone - 如何添加JSON框架

java - 当我迭代 ArrayList 时出现 ConcurrentModificationException

java.lang.IllegalArgumentException : Unknown parameter name : customer 异常

javascript - 使用 Javascript 访问 JSON 数组?

javascript - 如何使用 lodash.js 或 underscore.js 过滤 json?