Fork me on GitHub

I’m causing myself problems by using clj-time to encode timestamps in my server responses:

Caused by: java.lang.IllegalArgumentException: No implementation of method: :packable-pack of protocol: #'msgpack.core/Packable found for class: org.joda.time.DateTime
I haven´t fully wrapped my head around coercions yet. Is this something I should handle manually before sending the response back to the API endpoint, or could I set up a coercion to convert the timestamp into a string?


@henrik With msgpack think you need to write a extension to support joda dates directly, like this:


coercion is normally used to widen the types, eg from string -> keyword|date|...


there could be a custom coercion to do the opposite (date->string, keyword->string), but normally this is done by the format encoder


we actually dropped msgpack & yaml from the default settings in the latest alpha (easy to put back) as they don't provide support for all common types.


@ikitommi Gotcha, thank you!


Did you? As of alpha 6, they seem to be in there.


Ah, we’re at alpha 7 now.


I thought it was pretty cool to find that yaml of all things was supported out of the box. Makes sense though, if the format is lacking.