If you absolutely do not need other keys in the outermost object, you can parse the array using key "data" and then parse it separately in your POJO. Below is my rough implementation:
First analyze the data array:
String json = "{\"success\": true,\"data\": [{\"test\": \"some data\"}]}";
JSONObject obj = new JSONObject(json);
String data = obj.getJSONArray("data").toString();
Then, using Jackson (or something else), create an ArrayList with your required objects:
ObjectMapper objectMapper = new ObjectMapper();
TypeReference<ArrayList<PipeDriveContact>> typeRef = new TypeReference<ArrayList<PipeDriveContact>>() {};
ArrayList<PipeDriveContact> dataArray = objectMapper.readValue(data, typeRef);
The following is a POJO model created for testing:
public class PipeDriveContact {
private String test;
public String getTest() { return test; }
public void setTest(String test) { this.test = test; }
}
The following are the dependencies that I used:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20171018</version>
</dependency>
Hope this helps.