This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-03
Channels
- # adventofcode (107)
- # announcements (1)
- # asami (14)
- # babashka (67)
- # beginners (89)
- # calva (34)
- # cider (17)
- # clj-kondo (5)
- # cljs-dev (2)
- # clojure (57)
- # clojure-europe (52)
- # clojure-india (1)
- # clojure-italy (1)
- # clojure-losangeles (2)
- # clojure-nl (6)
- # clojure-uk (39)
- # clojurescript (40)
- # community-development (3)
- # conjure (3)
- # cursive (17)
- # datomic (11)
- # docker (13)
- # events (3)
- # figwheel-main (3)
- # fulcro (12)
- # graalvm (7)
- # holy-lambda (7)
- # honeysql (9)
- # introduce-yourself (5)
- # malli (9)
- # minecraft (3)
- # missionary (21)
- # nextjournal (7)
- # off-topic (52)
- # pathom (3)
- # polylith (11)
- # portal (3)
- # re-frame (21)
- # reagent (34)
- # reclojure (7)
- # reitit (1)
- # reveal (11)
- # shadow-cljs (68)
- # tools-build (12)
- # tools-deps (5)
- # vim (4)
- # xtdb (9)
Hi folks. I’m wondering if anyone has successfully used muuntaja with a custom format? I want to it to treat `application/geo+json` the same as `application/json` but am having a hard time. have tried so far making a custom muuntaja instance in 2 different ways: with a custom format for geo+json that uses the same encoder/decoder as json
(m/create
(assoc-in m/default-options
[:formats "application/geo+json"]
geo+json-format))
and adding a matches regex for json to try to make it treat geo+json the same:
(m/create
(assoc-in m/default-options
[:formats "application/json" :matches]
#"^application\/(geo\+)?json$"))
and using that custom instance in the ring/router setup, like
(ring/router data {:data {:muuntaja content-negotiator
:middleware [...]}})
right now it looks like it’s just not recognizing `application/geo+json` as a response content type.. I get a 500 error, basically “can’t write map to streamable response body”, similar to what I get if I disable content negotiation entirely