Код: Выделить всё
ObjectMapper objectMapper = new ObjectMapper();
EnumMap mailingRequestCache = objectMapper.readValue(
MailingRequestFactory.class.getResource("/test-data.json"),
new TypeReference() {}
);
public enum TestCaseEnum {
TC_01;
}
@Data
@Jacksonized @Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class MailingRequest {
private String mailingId;
}
Код: Выделить всё
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"TC_01": {
"mailingId": "00"
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... ta-in-json