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?