Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

WebSocketSessionManager.send(String,Object) should use JSON-B (JSR-367) #4381

Open
ronelm2000 opened this issue Aug 24, 2018 · 0 comments
Open

Comments

@ronelm2000
Copy link

ronelm2000 commented Aug 24, 2018

Please replace:

            String json = Json.encode(message);

with:

            Jsonb jsonb = JsonbBuilder.create(); // this could also just be a bean?
            String json = jsonb.toJson(message);

com.sun.faces.util.Json.encode only contains the bare minimum for my functional requirements. Json.encode doesn't utilize custom annotations to stop bidirectional loops nor defining custom json (it already loops on a typical Enum class). In my case particularly, I'd like to either implement Yasson or make my own GSON/Jackson wrapper.

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

No branches or pull requests

1 participant