Thank you for fast response, now I see more members in docs and also base classes. The combination of .contentType and .bodyWriter properties works well for me.
I'm quite surprised by the limitation of .dt templates, I was hoping to use them for JSON / plain text and some other formats generation. I guess it would be quite useful.
This attempt to generate JSON in .dt failed
[
- foreach (b; bs)
{"key":#{b.id}}
]
I would consider this code more elegant than writing string to streams and I would very much liked if .dt would not be limited to html
also it generates text/html content type, even if I explicitly set "application/json" in app code just before rendering template.