use of cn.eoe.app.entity.NewsJson in project android-app by eoecn.
the class NewsDao method mapperJson.
public NewsResponseEntity mapperJson(boolean useCache) {
// TODO Auto-generated method stub
NewsJson newsJson;
try {
String result = RequestCacheUtil.getRequestContent(mActivity, Urls.NEWS_LIST + Utility.getScreenParams(mActivity), Constants.WebSourceType.Json, Constants.DBContentType.Content_list, useCache);
newsJson = mObjectMapper.readValue(result, new TypeReference<NewsJson>() {
});
if (newsJson == null) {
return null;
}
this._newsResponse = newsJson.getResponse();
return _newsResponse;
} catch (JsonParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JsonMappingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
Aggregations