public static JSONObject processResponse(int responseCode, String errorCode, String errorMsg) throws JSONException {
        JSONObject response = new JSONObject();
        response.put("responseCode", responseCode);
        response.put("errorCode", errorCode);
        response.put("errorMsg", errorMsg);

        return response;
    }
public static JSONObject processResponse ( int responseCode , String errorCode , String errorMsg ) throws JSONException { JSONObject response = new JSONObject ( ) ; response . put ( "responseCode" , responseCode ) ; response . put ( "errorCode" , errorCode ) ; response . put ( "errorMsg" , errorMsg ) ; return response ; }
for bad response, whose responseCode is not 200 level

@param responseCode
@param errorCode
@param errorMsg
@return
@throws JSONException