}
/*package*/
static ResponseList<Trends> createTrendsList(HttpResponse res, boolean storeJSON) throws
TwitterException {
JSONObject json = res.asJSONObject();
ResponseList<Trends> trends;
try {
Date asOf = z_T4JInternalParseUtil.parseTrendsDate(json.getString("as_of"));
JSONObject trendsJson = json.getJSONObject("trends");
Location location = extractLocation(json, storeJSON);
trends = new ResponseListImpl<Trends>(trendsJson.length(), res);
Iterator ite = trendsJson.keys();
while (ite.hasNext()) {
String key = (String) ite.next();
JSONArray array = trendsJson.getJSONArray(key);
Trend[] trendsArray = jsonArrayToTrendArray(array, storeJSON);
if (key.length() == 19) {
// current trends
trends.add(new TrendsJSONImpl(asOf, location, getDate(key
, "yyyy-MM-dd HH:mm:ss"), trendsArray));