Liking cljdoc? Tell your friends :D

metabase.middleware.json

Middleware related to parsing JSON requests and generating JSON responses.

Middleware related to parsing JSON requests and generating JSON responses.
raw docstring

wrap-json-bodyclj

(wrap-json-body handler)

Middleware that parses JSON in the body of a request. (This is basically a copy of ring-json-middleware, but tweaked to handle async-style calls.)

Middleware that parses JSON in the body of a request. (This is basically a copy of `ring-json-middleware`, but
tweaked to handle async-style calls.)
sourceraw docstring

wrap-streamed-json-responseclj

(wrap-streamed-json-response handler & [{:as opts}])

Similar to ring.middleware/wrap-json-response in that it will serialize the response's body to JSON if it's a collection. Rather than generating a string it will stream the response using a PipedOutputStream.

Accepts the following options (same as wrap-json-response):

:pretty - true if the JSON should be pretty-printed :escape-non-ascii - true if non-ASCII characters should be escaped with \u

Similar to ring.middleware/wrap-json-response in that it will serialize the response's body to JSON if it's a
collection. Rather than generating a string it will stream the response using a PipedOutputStream.

Accepts the following options (same as `wrap-json-response`):

:pretty            - true if the JSON should be pretty-printed
:escape-non-ascii  - true if non-ASCII characters should be escaped with \u
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close