chickadee » schematra » send-json-response

send-json-response datum #!optional statusprocedure

Send a JSON response with proper content-type headers. Default status is ok (200).

(send-json-response '((status . "healthy") (version . "1.0")))
(send-json-response '((error . "Not found")) 'not-found)