title: Parsing JSON from HttpClient request using JSON.org parser
body: <p>I am trying to parse JSON using a Notes agent, JSON is fetched using Apache HttpClient.</p>
  
  <p>Here is the code that return the JSON</p>
  
  <pre><code>import lotus.domino.*;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.impl.client.HttpClientBuilder;
  
        Session session = getSession();
        AgentContext agentContext = session.getAgentContext();
  
        HttpClient client = HttpClientBuilder.create().build();
        HttpGet request = new HttpGet("http://api.acme.com/customer");
        request.addHeader("accept", "application/json");
        request.addHeader("Host", "api.acme.com");
        request.addHeader("X-Api-Version", "1.0");
        request.addHeader("Authorization", "Basic ...");
  
        HttpResponse response = client.execute(request);       
  </code></pre>
  
  <p>The JSON Looks like this.</p>
  
  <pre><code>[ 
    { 
      "id": 123456, 
      "insertDate": "2014-05-12T16:51:38.343", 
      "read": false, 
      "site": "acme.com", 
      "Email": "john.doe@acme.com", 
      "location": "/customer/1212?v=1.0" 
    } 
  ] 
  </code></pre>
  
  <p>I have tried to use <code>JSONObject</code> and <code>JSONArray</code> from JSON.org but could not get it to work
  I need some example code from the json.org package or other ways to parse the json.</p>