This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-13
Channels
- # beginners (42)
- # boot (33)
- # cider (4)
- # clara (1)
- # cljs-dev (2)
- # clojars (3)
- # clojure (207)
- # clojure-boston (1)
- # clojure-france (3)
- # clojure-india (7)
- # clojure-miami (1)
- # clojure-nl (8)
- # clojure-poland (13)
- # clojure-russia (102)
- # clojure-spec (22)
- # clojure-uk (37)
- # clojureremote (15)
- # clojurescript (229)
- # cursive (9)
- # datomic (1)
- # emacs (7)
- # figwheel (2)
- # funcool (1)
- # garden (1)
- # hoplon (7)
- # jobs (12)
- # jobs-discuss (27)
- # juxt (2)
- # leiningen (6)
- # luminus (9)
- # lumo (18)
- # off-topic (3)
- # onyx (9)
- # re-frame (54)
- # reagent (5)
- # remote-jobs (3)
- # ring (3)
- # rum (3)
- # specter (28)
- # yada (30)
Thank you @yogthos I’ll give that a try.
hi, there is an easier way to setup the params for Muuntaja. All formats have optional :encoder-opts
and :decoder-opts
that get merged into the default opts. So, a assoc-in would do here.
here’s a sample from Muuntaja README:
(-> (muuntaja/create
(assoc-in
muuntaja/default-options
[:formats "application/edn" :decoder-opts]
{:readers {'INC inc}}))
(muuntaja/decode
"application/edn"
"{:value #INC 41}")); {:value 42}
I think transit-example would be good too, thanks for the tip. The responses.md is awesome.
One idea for Luminus: mount (and configure) the Muuntaja instance with mount and just pass the instance to the wrap-params
. The mw takes either an Muuntaja instance or options (and creates the instance itself). Having a app-level instance available makes the encoding & decoding symmetric. e.g. you can use the instance to encode stuff downstream with same settings. e.g. write custom transit to log/db etc.