title: Reading a JSON file with multiple attributes
body: <p>I'm trying to read a JSON file that contains an array of different bikes. When trying to print out the bikes to the java console, i keep getting a null point exception. I'm going to make it so that all the bikes are made into object, but for now just looking on how to print them out.</p>
  
  <pre><code>public static void main(String[] args) {
  
      JSONParser parser = new JSONParser();
  
      try {
          Object obj = parser.parse(new FileReader("src/bikes.json"));
  
          JSONObject jsonObject = (JSONObject) obj;
          //System.out.println(jsonObject);
  
          JSONArray bikeList = (JSONArray) jsonObject.get("BikeList");
  
          Iterator&lt;String&gt; iterator = bikeList.iterator();
          while(iterator.hasNext()) {
              System.out.println(iterator.next());
          }
  
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      } catch (ParseException e) {
          e.printStackTrace();
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>JSON File:</p>
  
  <pre><code> {
      "Search": {
          "BikeList": [
              {
                  "weight": "14.8",
                  "colour": "Blue",
                  "price": 149.99,
                  "name": "Hybrid Pro"
              },
              {
                  "weight": "15.8",
                  "colour": "Red",
                  "price": 249.99,
                  "name": "Slant comp"
              },
              {
                  "weight": "17.9",
                  "colour": "Pink",
                  "price": 500.00,
                  "name": "Charm"
              }
          ]
      }
  }
  </code></pre>