First of all please look at my code below:
    List<BasicNameValuePair> qsList = new ArrayList<BasicNameValuePair>();
    qsList.add(new BasicNameValuePair("oauth_token", accessToken));
    String queryString = URLEncodedUtils.format(qsList, HTTP.UTF_8);
    HttpGet userInfoRequest = new HttpGet(id + "?" + queryString);
    DefaultHttpClient defaultHttpClientclient = new DefaultHttpClient();
    HttpResponse userInfoResponse;
    try {
        userInfoResponse = defaultHttpClientclient.execute(userInfoRequest);
        String responseBody = EntityUtils.toString(userInfoResponse.getEntity());
        System.out.println("User info response: " + responseBody);
        System.out.println("");
    } catch (ClientProtocolException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
I got an access token from Salesforce. Now I request user's information via that token. In the responseBody I got all infomation of that user like username, id, language,... Now I need to take only username from the response. What should I do to take it?
 
     
    