Skip to content

feat(websocket): Add serializer/deserializer config settings#3489

Merged
benlesh merged 1 commit intoReactiveX:masterfrom
benlesh:update-websocket
Mar 29, 2018
Merged

feat(websocket): Add serializer/deserializer config settings#3489
benlesh merged 1 commit intoReactiveX:masterfrom
benlesh:update-websocket

Conversation

@benlesh
Copy link
Member

@benlesh benlesh commented Mar 29, 2018

  • Fixes the build for latest TypeScript
  • Adds a serializer and deserializer config setting that defaults to JSON serialization both in and out of the socket
  • deprecates the resultSelector (use deserializer instead)
  • updates tests
  • adds documentation

BREAKING CHANGE: WebSocketSubject will now JSON serialize all messages sent over it by default, to return to the old behavior, pass a config setting of serializer: x => x like so: websocket({ url, serializer: x => x })

- Fixes the build for latest TypeScript
- Adds a `serializer` and `deserializer` config setting that defaults to JSON serialization both in and out of the socket
- deprecates the `resultSelector` (use `deserializer` instead)

BREAKING CHANGE: WebSocketSubject will now JSON serialize all messages sent over it by default, to return to the old behavior, pass a config setting of `serializer: x => x` like so: `websocket({ url, serializer: x => x })`
@rxjs-bot
Copy link

Warnings
⚠️

❗ Big PR (1)

(1) : Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.

Generated by 🚫 dangerJS

@benlesh benlesh merged commit 8d44124 into ReactiveX:master Mar 29, 2018
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants