FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

Add `@JsonCreatore.mode` property to explicitly choose between delegating- and property-based creators #47

Closed cowtowncoder closed 9 years ago

cowtowncoder commented 9 years ago

There is one potentially ambiguous case for @JsonCreator: a single-argument creator, with implicit (but not explicit) name for the argument, could conceivably be either delegating- or property-based creator. Although better heuristics might be able to choose correctly, it is likely that there are cases where no heuristic could give 100% correct result, and an explicit override is needed. Further, extension modules may want to have a say here as well (for example, Scala module has better class metadata available), and adding a property to introspect allows overriding of introspection.