code: @Override
      public Object[][] getAllData() {
          logger.entering(resource);
          Class<?> arrayType;
          Object[][] dataToBeReturned = null;
          JsonReader reader = new JsonReader(getReader(resource));
          try {
              // The type specified must be converted to array type for the parser
              // to deal with array of JSON objects
              arrayType = Array.newInstance(resource.getCls(), 0).getClass();
              logger.log(Level.FINE, "The Json Data is mapped as", arrayType);
              dataToBeReturned = mapJsonData(reader, arrayType);
          } catch (Exception e) {
              throw new DataProviderException("Error while parsing Json Data", e);
          } finally {
              IOUtils.closeQuietly(reader);
          }
          logger.exiting((Object[]) dataToBeReturned);
          return dataToBeReturned;
      }
docs: Parses the JSON file as a 2D Object array for TestNg dataprovider usage.<br>
  
  <pre>
  <i>Array Of Objects mapped to a user defined type:</i>
  [
  {
  "name":"Optimus Prime",
  "password":123456,
  "accountNumber":999999999,
  "amount":50000,
  "areaCode":[{ "areaCode" :"area1"},
  { "areaCode" :"area2"}],
  "bank":{
  "name" : "Bank1",
  "type" : "Savings",
  "address" : {
  "street":"1234 Some St"
  }
  },
  "phoneNumber":"1111111111",
  "preintTest":10
  },
  {
  "name":"Megatron",
  "password":123456,
  "accountNumber":999999999,
  "amount":80000,
  "areaCode":[{ "areaCode" :"area3"},
  { "areaCode" :"area4"}],
  "bank":{
  "name" : "Bank2",
  "type" : "Current",
  "address" : {
  "street":"1234 any St"
  }
  },
  "phoneNumber":"1111111111",
  "preintTest":100
  }
  ]
  
  <i>Test Method Signature</i>
  
  {@code public void readJsonArray(TestData testData)}
  </pre>