Simple Jackson deserialization of nested objects
问题 This should be trivial but for some reason I can't seem to get it right. I have the following JSON response { "info": "processing", "data": { "id": "123", "cars": [ { "id": "1" }, { "id": "2" } ] } } I've tried converting it with simple POJO's @JsonRootName(value = "data") public class Product { String id; List<Car> cars; } And public class Car { String id; } But that returns an empty Product object with the id and products null. Surely I don't need to write a custom JsonDeserialize for this