(note: continuation of [some issue but wrote originally down wrong])
Although @JsonValue is currently only used for serialization purposes, it seems it could be used for deciding on one otherwise ambiguous use case: that of 1-argument Creator method without mode property.
This case currently uses heuristics, such that:
- If there is explicit name specified for Creator argument (like
@JsonProperty), Mode.PROPERTIES is used
- If there is a named non-creator-property matching Creator argument name,
Mode.PROPERTIES is used -- this is typically the case for Record types
- Otherwise
Mode.DELEGATING is used (unless different default choice specified)
However: use of @JsonValue would strongly suggest that as the second step (after explicit name for Creator argument) we should consider its existence to select Mode.DELEGATING instead.
(note: continuation of [some issue but wrote originally down wrong])
Although
@JsonValueis currently only used for serialization purposes, it seems it could be used for deciding on one otherwise ambiguous use case: that of 1-argument Creator method withoutmodeproperty.This case currently uses heuristics, such that:
@JsonProperty),Mode.PROPERTIESis usedMode.PROPERTIESis used -- this is typically the case for Record typesMode.DELEGATINGis used (unless different default choice specified)However: use of
@JsonValuewould strongly suggest that as the second step (after explicit name for Creator argument) we should consider its existence to selectMode.DELEGATINGinstead.