Search in sources :

Example 1 with DetailsOwnDiscussJson

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

the class DiscussDao method mapperJson.

public DetailsOwnDiscussJson mapperJson(String url, boolean useCache) {
    // TODO Auto-generated method stub
    DetailsOwnDiscussJson json = null;
    try {
        String result = RequestCacheUtil.getRequestContent(mActivity, url, Constants.WebSourceType.Json, Constants.DBContentType.Discuss, useCache);
        json = mObjectMapper.readValue(result, new TypeReference<DetailsOwnDiscussJson>() {
        });
        return json;
    } 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();
    }
    return null;
}
Also used : JsonMappingException(org.codehaus.jackson.map.JsonMappingException) TypeReference(org.codehaus.jackson.type.TypeReference) IOException(java.io.IOException) JsonParseException(org.codehaus.jackson.JsonParseException) DetailsOwnDiscussJson(cn.eoe.app.entity.DetailsOwnDiscussJson)

Aggregations

DetailsOwnDiscussJson (cn.eoe.app.entity.DetailsOwnDiscussJson)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