[RFC] vibe.web.web: Support JSON more natively#1697
[RFC] vibe.web.web: Support JSON more natively#1697wilzbach wants to merge 1 commit intovibe-d:masterfrom
Conversation
|
The direction definitely makes sense. What I had in mind for quite a while now was to let the REST and web interface generators share more code - maybe in the form of using One reason for going that route (apart from strengthening the least-surprise factor) is that I recently had a lot of places where having |
820c13e to
5ddd6f1
Compare
d652d6f to
169f7c5
Compare
As this stalled a bit in the queue, I have split this PR into three pieces which should make it a lot easier to evaluate them in small pieces (I think the split-offs are non-controversial, only this one might be).
I agree that this wouldn't be bad, but Json is so commonly nowadays that I would prefer |
FYI: this might soon be |
A couple of improvement ideas to help working with Json:
Jsonas function parameter -> call withreq.json(-> vibe.web.web: Allow Json as a auto-injected parameter type #1853)req.writeBody(for those simple APIs where "OK" is needed) (-> vibe.web.web: Allow to return strings #1854)