This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-03
Channels
- # bangalore-clj (1)
- # beginners (104)
- # boot (30)
- # braveandtrue (1)
- # cider (6)
- # cljs-dev (95)
- # cljsjs (16)
- # cljsrn (3)
- # clojure (106)
- # clojure-italy (15)
- # clojure-nl (2)
- # clojure-norway (3)
- # clojure-russia (1)
- # clojure-spec (40)
- # clojure-uk (53)
- # clojure-ukraine (1)
- # clojurescript (200)
- # code-reviews (2)
- # cursive (1)
- # datascript (3)
- # datomic (32)
- # editors (28)
- # gorilla (6)
- # graphql (8)
- # hoplon (1)
- # jobs (8)
- # jobs-discuss (5)
- # jobs-rus (1)
- # keechma (13)
- # leiningen (5)
- # luminus (3)
- # lumo (53)
- # off-topic (5)
- # om (5)
- # om-next (1)
- # onyx (56)
- # parinfer (7)
- # protorepl (22)
- # re-frame (47)
- # reagent (37)
- # remote-jobs (1)
- # ring-swagger (9)
- # specter (7)
- # vim (14)
- # yada (30)
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: https://github.com/edma2/clojure-msgpack/blob/master/src/msgpack/clojure_extensions.clj
there could be a custom coercion to do the opposite (date->string, keyword->string), but normally this is done by the format encoder