Skip to content

Note: SockJS defined protocol is invalid json #95

Open
@cryptocompress

Description

@cryptocompress

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions