Open GoogleCodeExporter opened 8 years ago
here some useful code:
at line 122 of GmailImporter:
(note i use System.out beacuse bean contact doesn't support telephone yet :) )
if (jsonObj.has("Phones")) {
JSONArray phones = jsonObj.getJSONArray("Phones");
for (int j = 0; j < phones.length(); j++) {
JSONObject phonesJsonObj =
phones.getJSONObject(j);
String number =
phonesJsonObj.getString("Number");
String type =
phonesJsonObj.getJSONObject("Type").getString("Id");
System.out.println("------------------" +
type + "---------------------------------------------" + number);
}
}
Original comment by dconso...@gmail.com
on 3 Jul 2009 at 9:32
Original issue reported on code.google.com by
dconso...@gmail.com
on 3 Jul 2009 at 8:49