Janpot/next-rpc

Custom serialization/deserilazation for parameters and return values

Opened this issue · 0 comments

To be able to serialize non-JSON datatypes like Date in RPC functions more easily and transparently it would be beneficial to be able to provide custom serializer/deserializer function for parameters and return values.

For example library like Superjson could be used (https://github.com/blitz-js/superjson).

I can try to suggest PR if interested. Suggestions and ideas how to implement are welcome.