Skip to content

Make it easy to use with Jackson #47

@Artur-

Description

@Artur-

Right now the library has a hard dependency on org.json. This is problematic for two reasons:

  1. org.json has a non standard license which makes people wary
  2. You many times want your message to be deserialized to a bean type. Creating a JSONObject out of the received JSON is purely overhead.

I haven't looked very deeply into this yet but this code I have in my project does not seem very optimal:

            socket.on("message", ee -> {
                JSONObject json = (JSONObject) ee[0];
                AbstractServerMessage message = objectMapper.readValue(json.toString(), AbstractServerMessage.class);

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