JSON API and WebSockets


#1

Good afternoon. Has anyone put any thought into how JSON API might work with WebSockets? I’m considering using JSON API for a REST service which may someday grow support for WebSockets in order to better support things like lower overhead request/replies and pushing events to a listening service/browser. Is it worth trying to wrap messages in a JSON API envelope?


#2

Hi!

Yes, we’ve actively been thinking about how JSON API might work over other protocols (and, in particular, Websockets considerations have influenced the design of #795 and #824). There isn’t a final spec yet for non-HTTP protocols, but you can safely count on one existing eventually, and that it will use a very similar message format as JSON API over HTTP.


#3

Thanks @ethanresnick! I’ll track those issues.