I'm unable to apply the Jackson's @JsonValue annotation on the value parameter of enum class:
enum class CancellationReason(@JsonValue val code: String) {
CUSTOMER_RESIGNED("20"),
ERRORS_IN_FOO("21"),
ERRORS_IN_BAR("24");
}
The error message states: This annotation in not applicable to target 'value parameter'. What's the problem?