Open bompi88 opened 1 day ago
Hi @bompi88
I like the idea of using something like the getPath
method. I will also consider this issue.
It is unrelated to query parsing, but it would be interesting to allow users to specify a custom JSON serializer as a good example of using something like getPath
.
@yusukebe thanks! I've updated the ticket with the example from the https://github.com/honojs/hono/pull/3565 + example how it is done in for example express (please not get too inspired by that approach).
@yusukebe I know that there is currently an ongoing PR regarding the URLSearchParams
that is kind of related (and not), but let me know if there anything I can facilitate regarding this ticket.
What is the feature you are proposing?
I want to be able to switch out the default query parser with something like qs.
I am able to use a validator to "hack something together", but if I'm using
@hono/zod-openapi
that will not be able to use the output of that validator.Something like the
getPath
method would be sufficient enough for my use case.EDIT:
Adding more context to the ticket. I'm using a special query "syntax" which is supported by
qs
. For example I can do?amount[lte]=300
which resolves to:For comparison here is how you can change the query parser in
express
. Not that we should follow their approach because I think that one looks messy.