You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -172,6 +172,28 @@ const pubsub = new RedisPubSub({
172
172
173
173
You can learn more on the `ioredis` package [here](https://github.com/luin/ioredis).
174
174
175
+
## Using a custom serializer/deserializer
176
+
177
+
By default, Javascript objects are (de)serialized using the `JSON.stringify` and `JSON.parse` methods.
178
+
You may pass your own serializer and/or deserializer function(s) as part of the options.
179
+
180
+
The `deserializer` will be called with an extra context object containing `pattern` (if available) and `channel` properties, allowing you to access this information when subscribing to a pattern.
0 commit comments