Add record target type to `JsonPropertyDescription`
Hi!
Currently JsonPropertyDescription does not have a target type of RECORD_COMPONENT, making it impossible to read it out at runtime. Adding that would be great.
Cheers and thanks
Which JDK is this available in? Unfortunately annotations must compile with JDK 8, to Java 8 bytecode.
Oh no. I read somewhere that annotations already has a JDK16 baseline. Which is where this element has been added. Then maybe with an upcoming 3.x release.
@bcersows Alas, no -- 3.x databind depends on 2.x annotations to maximize compatibility. See #307 and https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-1#handling-of-jackson-annotations .
So this is bit of a problem. Might even lead to re-evaluating annotation question... But on short-to-medium term annotations are limited to Java 8.
Pity. Would you like me to close the issue and PR?
You can leave issue open as placeholder, maybe close PR.
For Jackson 2.x this seems blocked by the Java 8 annotation target set, but it may still be worth documenting the intended Jackson 3.x behavior. If RECORD_COMPONENT can only be added once the annotations module baseline moves past Java 16, users need to know whether the interim recommendation is duplicating @JsonPropertyDescription on the accessor/field, or reading record component annotations through a separate introspection path.
Eventually we do need to figure out upgrade path for jackson-annotations but for now Java 8 will remain baseline so this cannot be resolved. No change will come for 3.3 but even beyond that there's big decision wrt how exactly to re-create jackson-annotations 3.x series (wrt backwards compatibility).