-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build-your-own-parser #22
Comments
I think this lib is pretty easy to understand. IMO they should just fork this lib if they wanna do more stuff. Most of the logic should be in separate libs anyways |
I think it would be better to have the interface and people have parsing libs than lots of body-parser forks. |
This module should be the interface. |
You guys are just adding more responsibility to your plate hah |
Yeah, that's the issue, may be too much to be worthwhile to support. |
i.am.machine :DDD |
I can tackle this if it's helpful |
This is actually nearly done, as it was intended for the goal of bringing body-parser back into express core. Out of curiosity, what parser were you planning to build that we don't have already :)? |
good question |
xml |
lol |
lol. Somehow I knew that was the answer ;) Currently the best you can do is to use |
The reason why I had a feeling is because I use this module to parse XML all the time, but of course using text + parser requires the request body to buffer up instead of feeding it to an incremental parser (CSV is another common one, which I also use!). This new stuff will actually be out sooner rather than later since I should not be distracted with express core. |
JSON5? I use that in a few APIs, because it's easier to debug such api with a curl (and b/w compatibility with json is perfect). Even created express-json5 based on bodyParser. So this use-case is more real than it seems. |
Though it looks like as body-parser is currently, it can be significantly simplified by wrapping |
@rlidwka or, looking at your code now, you could technically wrap |
How do you build may I ask? |
If you look at the middleware, after I had refactored it, all they are is a call to
typeis
and a call toread
. We should add something likebodyParser.generic()
to let people roll their owner simple body parsers.The text was updated successfully, but these errors were encountered: