Android Open Source - httpbreeze Json Response Converter






From Project

Back to project page httpbreeze.

License

The source code is released under:

GNU General Public License

If you think the Android project httpbreeze listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.http.breeze.rest;
//from   w  w  w  . j av a 2 s  .  c o m
import org.json.JSONException;
import org.json.JSONObject;

public class JsonResponseConverter implements HttpResponseConverter<JSONObject>{
  
  private JsonResponseConverter(){
    
  }

  @Override
  public JSONObject convertResponse(String httpResponse) {
    try {
      return new JSONObject(httpResponse);
    } catch (JSONException e) {
      e.printStackTrace();
      return null;
    }
  }
  
  public static JsonResponseConverter newInstance(){
    return new JsonResponseConverter();
  }

}




Java Source Code List

com.http.breeze.rest.HttpMethod.java
com.http.breeze.rest.HttpRequestExecutorTemplate.java
com.http.breeze.rest.HttpRequestExecutorType.java
com.http.breeze.rest.HttpRequestExecutor.java
com.http.breeze.rest.HttpRequest.java
com.http.breeze.rest.HttpResponseConverter.java
com.http.breeze.rest.JsonResponseConverter.java
com.http.breeze.rest.RawHttpRequestExecutor.java