I'm getting a response from Elasticsearch in JSON format that I'd like Gson to convert into a Java class, however I'm having trouble wrapping my head about how to develop the class. Here's the JSON that is returned:
{
"took":3,
"_shards":{
"total":3,
"successful":3,
"failed":0
},
"total":1,
"matches":[
{
"_index":"object_percolator",
"_id":"2"
},
{
"_index":"object_percolator",
"_id":"3"
}
]
}
The 'matches' is what is giving me a hard time. How would I design the class to handle that array? Any ideas? Thanks in advance!