Middleware related to parsing JSON requests and generating JSON responses.
Middleware related to parsing JSON requests and generating JSON responses.
(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.)
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close