mojarra
mojarra copied to clipboard
WebSocketSessionManager.send(String,Object) should use JSON-B (JSR-367)
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.