Closed dsgoers closed 3 years ago
No, Jackson does not depend on any Spring components by default.
It should be quite easy to write a simple AnnotationIntrospector
that did this, however; and it could form a new small module.
AnnotationIntrospector
has a method called to look for format information; JacksonAnnotationIntrospector
looks for its own @JsonFormat
but custom one can use whatever source.
The reason this would have to go in a separate module is to keep Jackson components as close to zero-(external-)dependency as possible: users can then pick and choose things they depend on.
Hi, I have an entity like this:
and the method I'm POSTing to is:
However, I'm seeing this error:
It looks like
@DateTimeFormat
doesn't get used. I can fix this by adding@JsonFormat
, but I was wondering if I needed to. For some background, this entity is used in another request that's an HTML form POST (ie not Jackson) so that's why@JsonFormat
was never used.Thanks.