Skip to content

JSON respond blocks

Lucas Lorentz edited this page Oct 20, 2022 · 1 revision

If you need to respond with a JSON block, escape all the {, }, : and " characters with their \uXXXX equivalents (\u007b, \u007d, \u003a and \u0022):

caddy.respond: "\u007b\u0022key\u003a\u0022value\u0022\u007d"
↓
respond `{"key":"value"}`
Clone this wiki locally