DTO from JSON with dynamic key
问题 I'm trying to figure out how to write a nice DTO for a Spring Boot app that's proxying search capabilities to another (Python) service. So I currently have an almost perfect setup going. I'm only having problems with representing the aggregations I get back from Elasticsearch as objects on the Java side. Here's the current Aggregation DTO: package com.example.dto.search; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.util.List; import java.util.Map;