First things first: please try this with the latest 2.7.x patch to ensure problem still remains (2.7.9 I think).
-+ Tatu +- On Mon, Oct 16, 2017 at 7:38 AM, John Seusy <[email protected]> wrote: > I am using Jackson 2.7.3 with Java 1.8 and am having an issue getting > appropriate behavior out of an @JsonFormat annotated LocalDateTime. > > The general configuration of the formatter on these is: > > @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd > HH:mm:ss.SSS") > private LocalDateTime recordingEnd; > > This format works fine on all of the JSON that I am receiving which comes to > me with a matching format. However I am now generating outbound JSON to an > endpoint that is expecting that same format and my outbound JSON following > serialization appears to include the 'T' designation even though it is not > in the format: > > 2017-10-13T14:22:33.105 > > which causes the receiving process to choke. I am not, currently, at > liberty to update the receiving process to expect the 'T', which I had > assumed was fairly innocuous, so what options would exist for getting that > to disappear from the outbound JSON only without also changing the inbound > formats for all these LocalDateTime objects, and also preferably without > having to write custom serializers for every object containing a > LocalDateTime? > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
