Tracking down a problem with the latest upgrade. Because of a resolve failure, the arguments to a field are included in an error map; one value is a java.time.LocalDateTime. Cheshire throws an exception when streaming this as JSON, and the final result is a response with a body that is the empty string.
The right solution is to use cheshire.generator/add-encoder:
(add-encoder LocalDateTime
(fn [v ^JsonGenerator json-generator]
(.writeString json-generator (format-local-date-time v))))
Tracking down a problem with the latest upgrade. Because of a resolve failure, the arguments to a field are included in an error map; one value is a java.time.LocalDateTime. Cheshire throws an exception when streaming this as JSON, and the final result is a response with a body that is the empty string.
The right solution is to use
cheshire.generator/add-encoder: