title: How to print the entire JSON output?
body: <p>Please have a look at the following code</p>
  
  <pre><code>package com.example.jsontest;
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  
  import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.StatusLine;
  import org.apache.http.client.ClientProtocolException;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.os.StrictMode;
  import android.util.Log;
  import android.widget.EditText;
  import android.widget.Toast;
  
  public class MainActivity extends Activity {
  
      private EditText editText;
  
  /** Called when the activity is first created. */
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      StrictMode.ThreadPolicy policy = new StrictMode.
      ThreadPolicy.Builder().permitAll().build();
      StrictMode.setThreadPolicy(policy); 
  
      setContentView(R.layout.activity_main);
  
      editText = (EditText)findViewById(R.id.edit_text);
  
      //Call The JSon
      try {
          JSONObject jObject = new JSONObject(getJson());
  
  
          int code = jObject.getInt("code");
  
          editText.append("Code: "+code+"\n");
  
      } catch (JSONException e) {
          // TODO Auto-generated catch block
          e.printStackTrace(); 
      }
  
    }
  
    private String getJson()
    {
        DefaultHttpClient   httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost("https://bigml.io/andromeda/source/5277b1bd035d074e940056e0?username=xxx;api_key=xxxxxxxxxxxxxxx");
        // Depends on your web service
        httppost.setHeader("Content-type", "application/json");
  
        InputStream inputStream = null;
        String result = null;
        try {
            HttpResponse response = httpclient.execute(httppost);           
            HttpEntity entity = response.getEntity();
  
            inputStream = entity.getContent();
            // json is UTF-8 by default
            BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"), 8);
            StringBuilder sb = new StringBuilder();
  
            String line = null;
            while ((line = reader.readLine()) != null)
            {
                sb.append(line + "\n");
            }
            result = sb.toString();
        } catch (Exception e) { 
            // Oops
        }
        finally {
            try{if(inputStream != null)inputStream.close();}catch(Exception squish){}
        }
  
        return result;
    }
  } 
  </code></pre>
  
  <p>In here, what I need to do is, print the "entire" result I retrieved. I wish to print the entire thing, I don't need to get separate values. How can I do this? <a href="https://bigml.com/developers/sources#s_retrieve" rel="nofollow noreferrer">Here</a> is the link to the BigML retrieve documentation.</p>