How to add a custom serializer?

From @xqliang on Fri Dec 23 2016 05:20:04 GMT+0000 (UTC)

I need a serializer to serialize dates in JSON format, how to add it for RPC entrypoint?

The yaml serializer can handle dates, but it’s too slow.

Copied from original issue: https://github.com/nameko/nameko/issues/393