Closed
Description
My case is very trivial but it seems unsupported. I want to be able to separate between null and empty values.
What I would expect:
// qs library - https://github.com/ljharb/qs
var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true });
var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true });
// results in :
assert.deepEqual(parsedStrictNull, { a: null, b: '' });
_// bodyParser (what would seem practical to implement) _
bodyParser.urlencoded({extended: true, {strictNullHandling: true }})
What do I have: Nothing likely is currently implemented.
I was digging through the library and I found several attempts to make the parser more configurable. Maybe it is time to have a flexible way of exploring your default (extended) parser ?
I could also provide a pull request. It seems to me that it is a straight-forward feature.