On this page:
response/  json

15 JSON🔗

 (require koyo/json) package: koyo-lib

This module provides utilities for working with jsexpr? values.

procedure

(response/json e    
  [#:code code    
  #:headers headers])  response?
  e : jsexpr?
  code : response-code/c = 200
  headers : (listof header?) = null
Produces a response that writes e to the output as a JSON value. The #:code and #:headers parameters are passed to response/output unmodified. The MIME type of the response is always #"application/json; charset=utf-8".