ethanniser / next-typesafe-url

Fully typesafe, JSON serializable, and zod validated URL search params, dynamic route params, and routing for NextJS.
https://next-typesafe-url.dev
MIT License
349 stars 16 forks source link

support user provided custom serialization/deserialization #77

Open ethanniser opened 8 months ago

ethanniser commented 8 months ago

currently serialization/deserialization is hard coded in

there are many valid usecase for a user wanting a custom solution:

maybe look at how trpc handles custom transformers?

To discuss: What should the signature of the swappable serializer be? How to handle differences between search param and route param serialization / deserialization?

ethanniser commented 4 months ago

This should be trivial with @effect/schema but requires a big breaking change