This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-12
Channels
- # aatree (9)
- # admin-announcements (2)
- # alda (4)
- # announcements (2)
- # beginners (87)
- # boot (218)
- # braid-chat (14)
- # cbus (2)
- # cider (19)
- # cljs-dev (17)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (84)
- # clojure-android (1)
- # clojure-czech (8)
- # clojure-ireland (3)
- # clojure-madison (20)
- # clojure-poland (22)
- # clojure-russia (54)
- # clojure-sanfrancisco (1)
- # clojurescript (81)
- # clojurewest (4)
- # community-development (94)
- # conf-proposals (5)
- # core-async (199)
- # css (3)
- # cursive (68)
- # datavis (2)
- # datomic (23)
- # dysphemism (138)
- # editors (7)
- # hoplon (8)
- # jobs (8)
- # jobs-discuss (7)
- # ldnclj (2)
- # liberator (6)
- # off-topic (32)
- # om (200)
- # omnext (2)
- # onyx (88)
- # proton (58)
- # re-frame (14)
- # reagent (1)
- # ring-swagger (26)
- # yada (14)
can anyone give advice on how i might use pjson over cheshire for json parsing in a compojure-api app?
@jstokes: Might be possible by disabling built-in json support (`[:format :formats]`) and adding your own middleware
But setting :formats
option will also affect swagger docs
Maybe you can just use your own middleware without any settings, ring-middleware-format is probably no-op if the request body has already been parsed
Compojure-api just embeds ring-middleware-format with some specific options
@jstokes: Yes. If you do something like (pre 1.0 example): (defapi app' ...) (def app (-> app' wrap-own-mw))
own-mw will be applied before calling api handler
ill give it a shot, thanks @juhoteperi
I need to have json rq/rs with properties names in camelCaseFormat but would like to work in my system with maps with :kebab-style-keys
Hmm, I think r-m-f should allow options to cheshire
but then the problem is that my schema says for example user-id
(this is actually my internal format) while the json format should be userId
Hmm the default json format might be :json-kw
instead of :json
Oh right
I don't think there is a solution for having correct docs in this case currently
@juhoteperi: :json-kw
worked - thanks
Not sure how it could be fixed as different formats could have different names. It would require support from JSON Schema/Swagger
One possibility would be to force same key format for all formats