私はなんとかURLからJsonコンテンツを取得することができます:http ://twitter.com/statuses/public_timeline.json ツイートだけを提供します。次に、次の形式の別のURLから別のJSON配列を取得します。
  {
"contacts": [
    {
            "id": "c200",
            "name": "Ravi Tamada",
            "email": "ravi@gmail.com",
            "address": "xx-xx-xxxx,x - street, x - country",
            "gender" : "male",
    },
    {
            "id": "c201",
            "name": "Johnny Depp",
            "email": "johnny_depp@gmail.com",
            "address": "xx-xx-xxxx,x - street, x - country",
            "gender" : "male",
    },
    .
    .
}
確認できる違いは、1つのJSON配列には名前があり、2番目の配列には名前がないことです。ツイートの取得に使用したコードは次のとおりです。
  private class LoadListTask extends AsyncTask<Void, Tweet, Void> {
    private final ProgressDialog pd = new ProgressDialog(TweetTestActivity.this);
      // can use UI thread here
      @SuppressWarnings("unchecked")
    protected void onPreExecute() {
          ((ArrayAdapter<String>)getListAdapter()).clear();
         this.pd.setMessage("Loading List...");
         this.pd.show();
      }
    protected Void doInBackground(Void... ars) {
         // TODO    4 new activity with custom adapter to show schedules
         try {
            HttpClient client = new DefaultHttpClient();
            HttpGet get = new HttpGet("http://twitter.com/statuses/public_timeline.json");
            ResponseHandler<String> responseHandler = new BasicResponseHandler();
            JSONArray ja = new JSONArray(client.execute(get, responseHandler));
            for (int i = 0; i < ja.length(); i++) {
                 JSONObject jo = (JSONObject) ja.get(i);
                 publishProgress(new Tweet(jo.getString("id_str"),jo.getString("text")));
            }
         } catch (IOException e) {
             e.printStackTrace();
         } catch (JSONException e) {
             e.printStackTrace();
         } catch (Exception e) {
             e.printStackTrace();
        }
         return null;
     }
     @SuppressWarnings("unchecked")
    protected void onProgressUpdate(Tweet... progress) {
         ((ArrayAdapter<Tweet>)getListAdapter()).add(progress[0]);
         }
     protected void onPostExecute(Void result) {
         pd.dismiss();
     }
 }
質問:連絡先配列を取得するには、どのような変更を実行する必要がありますか?id_strをgender(そしてもちろんURL)に変更すると、次のようなエラーが発生するためです:org.json.JSONException:genderの値がありません。