[
https://issues.apache.org/jira/browse/NIFI-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15837698#comment-15837698
]
ASF GitHub Bot commented on NIFI-3343:
--------------------------------------
Github user jdye64 commented on the issue:
https://github.com/apache/nifi/pull/1414
@mcgilman that makes perfect sense. Thanks for pointing me to to code
snippet. I'll close this PR and the JIRA
> Annotate @XmlJavaTypeAdapter(DateTimeAdapter.class) fields in client dto with
> JsonFormat
> ----------------------------------------------------------------------------------------
>
> Key: NIFI-3343
> URL: https://issues.apache.org/jira/browse/NIFI-3343
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 1.1.1
> Reporter: Jeremy Dyer
> Assignee: Jeremy Dyer
> Fix For: 1.2.0
>
>
> Currently when implementing a client to consume NiFi client dto serialized
> objects Jackson is unable to deserialize
> @XmlJavaTypeAdapter(DateTimeAdapter.class) to a Java Date object since the
> format is unknown. Simply setting the default ObjectMapper default date using
> something like ...
> DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss Z");
> this.mapper.setDateFormat(dateFormat);
> Will not work because there are portions that do have dates in this format.
> The only options seems to making the end users write their own custom date
> deserializers =( or annotating the dto object fields with @JsonFormat so that
> it is handled for them automatically.
> I plan to annotate the fields because that seems most efficient for everyone.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)