If memory serves, you're working on a way to coerce query parameters from strings into their documented types. Zod will likely hit a limit when we start to implement array query parameters for things like coordinates.
So, I explored de-serialization tools and came across serialize-query-params. We can make a separate pipe to first decode the params. Then, Zod can parse them without any trickery.
In this example, I hand-write the decode schema. But for my next trick, I will attempt to build the decode schema from the zod schema
@TylerMatteo
If memory serves, you're working on a way to coerce query parameters from strings into their documented types. Zod will likely hit a limit when we start to implement array query parameters for things like coordinates.
So, I explored de-serialization tools and came across serialize-query-params. We can make a separate pipe to first decode the params. Then, Zod can parse them without any trickery.
In this example, I hand-write the decode schema. But for my next trick, I will attempt to build the decode schema from the zod schema