It seems like this should be a pretty resolute / well-considered issue, but I do not find many recommendations on it - hoping this is not a hoax.
My scenario basically is that I consume paginated JSON responses that look something like this:
{ "objects": [...], "meta": { "total": 5000, "page": 1, "result_pages": 20, "links": { "prev": null, "next": "/api/v3/objects/somequery?page=2" } } }
Obviously, this is simplified, but I hope it makes sense.
All I'm really interested in is the objects and next fields, but it looks like I need to create a whole DTO hierarchy to successfully deserialize the nested fields.
Is there an annotation for Jackson that would let me skip all this? If not, is there a set of best practices for this that does not include many mostly empty classes and files?
java json jackson deserialization
ap
source share