Open nicktombeur opened 1 year ago
Maybe it's possible to return { "date": "2023-05-13" } instead? This way I can add jackson-datatype-jsr310 to the classpath and com.microsoft.durabletask.JacksonDataConverter will pick it up.
Hi @nicktombeur, thanks for reaching out with this issue. I think there are few reasons that causing this issue for you.
java.time.LocalDate
. As you pointed out, it could be resolved by adding add jackson-datatype-jsr310
to your classpath and registering the JavaTimeModule
. However, we don't expose any interface to customers for example to register modules in ObjectMapper
of jackson. So even if you could add add jackson-datatype-jsr310
to your classpath, I don't think there is a way for you to register the module. "date":{"year":2023,"month":6,"day":20}
instead of { "date": "2023-05-13" }
, this is caused by the different formatting between gson used in Azure Function Java Language Worker and jackson used in this repo. For now please use your own custom Jackson deserializer as a workaround. The team will try to improve this soon. Thanks.
When returning an object containing a LocalDate, I get the following error.
I believe this date format is coming from protobuf? I can solve this problem by writing my own custom Jackson deserializer but shouldn't this be handled for us? Maybe it's possible to return
{ "date": "2023-05-13" }
instead? This way I can addjackson-datatype-jsr310
to the class path andcom.microsoft.durabletask.JacksonDataConverter
will pick it up.Example code: