Search in sources :

Example 1 with DetailJson

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

the class DetailDao method mapperJson.

public DetailResponseEntity mapperJson(boolean useCache) {
    try {
        String result = RequestCacheUtil.getRequestContent(mActivity, mUrl, Constants.WebSourceType.Json, Constants.DBContentType.Content_content, useCache);
        Log.i("info", mUrl);
        DetailJson detailJson = mObjectMapper.readValue(result, new TypeReference<DetailJson>() {
        });
        this.mDetailResponseEntity = detailJson.getResponse();
        return this.mDetailResponseEntity;
    } 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 : DetailJson(cn.eoe.app.entity.DetailJson) JsonMappingException(org.codehaus.jackson.map.JsonMappingException) 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

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