Search in sources :

Example 1 with BlogsJson

use of cn.eoe.app.entity.BlogsJson in project android-app by eoecn.

the class BlogsDao method mapperJson.

public BlogsResponseEntity mapperJson(boolean useCache) {
    BlogsJson blogsJson_;
    try {
        String result = RequestCacheUtil.getRequestContent(mActivity, Urls.BLOGS_LIST + Utility.getScreenParams(mActivity), Constants.WebSourceType.Json, Constants.DBContentType.Content_list, useCache);
        blogsJson_ = mObjectMapper.readValue(result, new TypeReference<BlogsJson>() {
        });
        if (blogsJson_ == null) {
            return null;
        }
        _blogsResponse = blogsJson_.getResponse();
        return _blogsResponse;
    } 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;
}
Also used : JsonMappingException(org.codehaus.jackson.map.JsonMappingException) BlogsJson(cn.eoe.app.entity.BlogsJson) TypeReference(org.codehaus.jackson.type.TypeReference) IOException(java.io.IOException) JsonParseException(org.codehaus.jackson.JsonParseException) JsonMappingException(org.codehaus.jackson.map.JsonMappingException) JsonParseException(org.codehaus.jackson.JsonParseException) IOException(java.io.IOException)

Aggregations

BlogsJson (cn.eoe.app.entity.BlogsJson)1 IOException (java.io.IOException)1 JsonParseException (org.codehaus.jackson.JsonParseException)1 JsonMappingException (org.codehaus.jackson.map.JsonMappingException)1 TypeReference (org.codehaus.jackson.type.TypeReference)1