title: How to get JSON data from an url in Java?
body: <p>I have checked out many pages but most of the tutorials and script return an error code with this type of JSON output. So how would I be able to extract the data from this JSON in Java?:</p>
  
  <pre><code>[
    {
      "user":{"id":"1","username":"user1"},
      "item_name":"item1",
      "custom_field":"custom1"
    },
    {
      "user":{"id":"2","username":"user2"},
      "item_name":"item2",
      "custom_field":"custom2"
    },
    {
      "user":{"id":"3","username":"user3"},
      "item_name":"item3",
      "custom_field":"custom3"
    }
  ]
  </code></pre>