Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note: SockJS defined protocol is invalid json #95

Open
cryptocompress opened this issue Nov 26, 2016 · 0 comments
Open

Note: SockJS defined protocol is invalid json #95

cryptocompress opened this issue Nov 26, 2016 · 0 comments

Comments

@cryptocompress
Copy link

cryptocompress commented Nov 26, 2016

Hello SockJS contributors!

It happened that I connected to SockJS (from .NET) and got this:

a["message"]

As stated in the docs (http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-42) it should be an Array of json-encoded messages. Please observe however it's invalid json b/c of char-prefix and can't be parse wihout a small hack:
var array = JArray.Parse(jsonString.TrimStart('a'));

It would be nice to see (in a future protocol version?) this frame identifiers (o, h, a, c) encoded into json and named explicitly.

{ version: x, frame: '...', data: [ ... ] }

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant