How to parse list of JSON objects surrounded by [] using Retrofit and GSON?
问题 I've created a simple REST endpoint: http://<server_address>:3000/sizes This URL returns a very simple response containing a json array as follows: [ { "id": 1, "name": "Small", "active": true }, { "id": 2, "name": "Medium", "active": true }, { "id": 3, "name": "Large", "active": true } ] Now, I'm trying to consume this response using Retrofit 2 with GSON . I've added a model: @lombok.AllArgsConstructor @lombok.EqualsAndHashCode @lombok.ToString public class Size { private int id; private