-
Notifications
You must be signed in to change notification settings - Fork 122
Feature request: Support case-insensitive LocalDate
formats (MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES)
#80
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
Comments
I have test cases to demonstrate the issue. That project contains a failing test case demonstrating the expected behaviour of the new feature. |
I don't think I want a new datatype-specific lower-case configuration setting to be added. I have no objection to actual functionality (that is, ability to accept case-insensitive values for specific property and/or all-properties-of-datatype), just about mechanisms used to enable this.. So, going forward, the main mechanism is combination of
Now, there is:
which could theoretically be used to allow lenience also with case-sensitivity. But alternatively there are also
which is not quite what we want... but we could easily add
to indicate that instead of JSON Object properties matching without case checking, values would be similarly handled. |
Ok, I'll take a look at it. I'd prefer to make the change on 2.x since I'm not familiar with the 3.x changes. |
Apologies for failing to follow up on this: I hope to get back to it in near future, to get this in 2.10 if all goes well. |
@pards Quick question: have I already asked for a CLA? If not, it can be found from:
and usual mechanism is to print, fill & sign, scan, email to I am thinking of starting by merging annotations change first (since that value will be needed for sure), and then go over databind, java 8 parts -- so at least API part will go in 2.10, and then various deserializers can start using the feature. |
So: added Follow-up question has to do with support for Joda, "classic" java.util.Date/Calendar. |
I'll get the CLA to you this week
Sent from ProtonMail mobile
…-------- Original Message --------
On Sep 15, 2019, 12:58 PM, Tatu Saloranta wrote:
So: added MapperFeature, JsonFormat.Feature, but before merging the rest will need the CLA.
On plus side, latter is not API change so could go in a patch as minor version has API.
Follow-up question has to do with support for Joda, "classic" java.util.Date/Calendar.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#80?email_source=notifications&email_token=AAM4TPAWVAPSVM4VIPQV73LQJZSSRA5CNFSM4FWHTLS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XUWPQ#issuecomment-531581758), or [mute the thread](https://github.com/notifications/unsubscribe-auth/AAM4TPFCWZUG2FE2OCFVQV3QJZSSRANCNFSM4FWHTLSQ).
|
Excellent. I wouldn't be pushing this expect that I want to make sure 2.10 goes out by end of September, and it'd be great to have implementation go with it. |
The signed agreement is attached. Please let me know if you need anything else.
Thank you for accepting my contribution!
Regards,
Craig
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Sunday, September 15, 2019 1:01 PM, Tatu Saloranta ***@***.***> wrote:
Excellent. I wouldn't be pushing this expect that I want to make sure 2.10 goes out by end of September, and it'd be great to have implementation go with it.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#80?email_source=notifications&email_token=AAM4TPHPZRWDJBR3UGMB473QJZS6FA5CNFSM4FWHTLS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XUYNQ#issuecomment-531582006), or [mute the thread](https://github.com/notifications/unsubscribe-auth/AAM4TPE5O46DDAE3ZK4D27LQJZS6FANCNFSM4FWHTLSQ).
|
I think github does not deal well with attachements, as I don't see one (I think it just drops them). |
LocalDate
formats (MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES)
Deserializing Strings like "22-JUL-1974" using "dd-MMM-yyyy" causes the following exception in Jackson.
The Java 8 time package supports case-insensitive date formats with options to the DateTimeFormatterBuilder such as:
I'd like to propose a new feature in Jackson to support case-insensitive parsing. I'm willing to work on it if you think the feature makes sense.
The text was updated successfully, but these errors were encountered: