private JSONObject getJson(String method, String url, JSONObject data) {
        JSONObject jo = null;
        HttpResponse response = null;
        try {

            response = doHTTPRequest(method, url, data);
            if (data != null) {
                BmLog.debug("HTTP Request body=\n\n\n" + data.toString() + "\n\n");
            }

            if (response != null) {
                String output = EntityUtils.toString(response.getEntity());
                BmLog.debug(output);
                jo = new JSONObject(output);
            }
        } catch (IOException e) {
            BmLog.error("Error while decoding Json: " + e.getMessage());
            BmLog.debug("Error while decoding Json: " + e.getMessage());
        } catch (JSONException e) {
            BmLog.error("Error while decoding Json: " + e.getMessage());
            BmLog.debug("Error while decoding Json: " + e.getMessage());
        } finally {
            return jo;
        }
    }