body-parser
body-parser copied to clipboard
Consider changing extended: true for urlencoded parser to be W3C JSON forms
Working draft: http://www.w3.org/TR/html-json-forms/
Thoughts from qs: https://github.com/hapijs/qs/issues/63
This support may not even be called extended: true within the urlencoded parser; it may move to be an option of the JSON parser.
If it's JSON, I think it should be the json parser?
If it's JSON, I think it should be the json parser?
Probably. See the description of the issue :)
Since qs will not be going this direction, we will be creating a new module and switching to that with 2.0
Since qs will not be going this direction, we will be creating a new module and switching to that with 2.0
:+1:
With the release of 1.0 of multer we switched to be W3C JSON forms compatible. The logic is contained in a separate module called append-field which is an implementation of the algorithm described in the spec, with tests to see that it works as well.
Note that this is not a querystring parser per se, but it would be extremely easy to write one on top of that. If you want one I'll write it for you :+1:
It's also very easy to write it so that it operates on a stream instead of a buffer which I think would be an advantage. That's how it works in multer, hence the api is appendField(store, key, val) which is meant to be called once for every key-value pair.
qs is discussing the future of the module here: https://github.com/hapijs/qs/issues/140
TL;DR It seems the trend it heading to EOL qs.