Why when a constructor is annotated with @JsonCreator, its arguments must be annotated with @JsonProperty?

Jackson has to know in what order to pass fields from a JSON object to the constructor.
It is not possible to access parameter names in Java using reflection – that’s why you have to repeat this information in annotations.

Leave a Comment