body-parser icon indicating copy to clipboard operation
body-parser copied to clipboard

Consider changing extended: true for urlencoded parser to be W3C JSON forms

Open dougwilson opened this issue 10 years ago • 7 comments

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.

dougwilson avatar Dec 18 '14 02:12 dougwilson

If it's JSON, I think it should be the json parser?

Fishrock123 avatar Dec 18 '14 14:12 Fishrock123

If it's JSON, I think it should be the json parser?

Probably. See the description of the issue :)

dougwilson avatar Dec 18 '14 15:12 dougwilson

Since qs will not be going this direction, we will be creating a new module and switching to that with 2.0

dougwilson avatar Jul 01 '15 16:07 dougwilson

Since qs will not be going this direction, we will be creating a new module and switching to that with 2.0

:+1:

jonathanong avatar Jul 01 '15 17:07 jonathanong

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:

LinusU avatar Aug 03 '15 09:08 LinusU

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.

LinusU avatar Aug 03 '15 09:08 LinusU

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.

MarkHerhold avatar Nov 22 '15 17:11 MarkHerhold