Return a static text with double quote json

Hi :wave:

I posted a more elaborate response regarding static json responses in the context of matrix servers before, which I highly recommend to you here :innocent:


But just for the record, you could use both backslashes \ or backticks `:
The Caddyfile Concept docs (hotlink to “Tokens and quotes”) state:

Quotes can be escaped if you need to use quotes in quoted tokens, too:

directive "\"abc def\""

[…]

You can also use a backtick ` to quote tokens; these are convenient when tokens themselves contain double quotes, e.g. JSON text:

directive `{"foo": "bar"}`
3 Likes