[ https://issues.apache.org/jira/browse/JOHNZON-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751389#comment-17751389 ]
Mark Struberg commented on JOHNZON-399: --------------------------------------- Well, it's actually a bit more complicated I fear. It is imo not just a 'pre JSON-B' problem. We get this as seemingly default behaviour from an Angular app. Now one can use the {code}@JsonbDateFormat{code} annotation. But this can only define a single format as per the spec, right? It is not a repeatable annotation nor is the SPI ({code}Converter<T>{code}) intended for it. What I'm aiming for is to have support for defining n different format strings as fallback. Because sometimes we get 2024-01-01, sometimes we might get 2024-01-01:00:00:00.000Z. Our service should understand both of them. > JsonbLocalDateConverter should also read javascript date format > --------------------------------------------------------------- > > Key: JOHNZON-399 > URL: https://issues.apache.org/jira/browse/JOHNZON-399 > Project: Johnzon > Issue Type: Improvement > Components: JSON-B > Affects Versions: 1.2.21 > Reporter: Mark Struberg > Assignee: Mark Struberg > Priority: Major > Fix For: 2.0.0, 1.2.22 > > > Javascript's date is very similar to java.util.Date - it does not only > contain the date but also a time portion. The format is > {code:java} > YYYY-MM-DDTHH:mm:ss.sssZ{code} > When using e.g. a datepicker and send it via JSON in JavaScript the time > portion is set to 00:00:00.000. But this leads to a date format exception in > our {code}JsonbLocalDateConverter{code}. > -- This message was sent by Atlassian Jira (v8.20.10#820010)