-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @JsonFormat.lenient
to allow configuring lenience of date/time deserializers
#105
Comments
Hmmh. This is tricky... leniency is such a |
Thanks for the quick reply :) I thought this too, but there is already a timezone parameter, which is also Date specific? It's a shame there's no character that can be used in the pattern string that denotes leniency. |
True, Although come to think of that, general concept of leniency might actually be relevant for other types as well. So perhaps this is something that should be added for 2.9 (needs to be there since it's an API change; plus annotation packages never change in patch versions). |
@JsonFormat.lenient
to allow configuring lenience of date/time deserializers
Added annotation; need to add issue for databind to actually make use of it. |
When I specify a date in the form:
@JsonFormat(pattern = "yyyy-MM-dd") Date endDate;
I would like to set the leniency to false.
Currently, a value of 2016-225-35 is allowed, but I would like to make this invalid.
e.g.
@JsonFormat(pattern = "yyyy-MM-dd", lenient = false) Date endDate;
The text was updated successfully, but these errors were encountered: