Fork me on GitHub
Kira McLean16:12:29

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

    (assoc-in m/default-options
              [:formats "application/geo+json"]
 and adding a matches regex for json to try to make it treat geo+json the same:
    (assoc-in m/default-options
              [:formats "application/json" :matches]
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