I’m trying to transform incoming JSON keys from camelCase into kebab-case, I found this tidbit but it’s not clear how to apply it. https://clojurians-log.clojureverse.org/luminus/2019-12-10
If I add it to to the
instance def in
middleware/formats.clj then I need to use it somewhere, so I added as a wrapper for my API (a compojure-api thing):
But this doesn’t seem to work.
(-> #'service-routes (wrap-authentication …) (wrap-routes middleware/wrap-formats))
I get an error from compojure-api:
ERROR compojure.api.exception - Malformed application/json request.