Skip to content

Need a WebSocket for SnapShot as JSON #31

@dukescript

Description

@dukescript

This is a RFE.

I'm creating a Client using DukeScript. I can connect to the Socket that sends the most current Snapshot (ws://localhost:8080/lightfish/snapshots/).Unfortunately it returns XML (I need JSON).

In order to test and develop, I added a dependency on moxy 2.6, created a jaxb.conf and changed the Serializer to create JSON:

org.lightfish.business.heartbeat.control.Serializer:

@PostConstruct
public void initialize(){
try {
JAXBContext jaxb = JAXBContext.newInstance(Snapshot.class,Escalations.class,Escalation.class);
this.marshaller = jaxb.createMarshaller();
this.marshaller.setProperty("eclipselink.media-type", "application/json");
} catch (JAXBException ex) {
throw new IllegalStateException("Cannot initialize JAXB context " + ex);
}
}

After that I can consume the messages without problems, but obviously this change breaks other clients. For my experiments that's no problem, but it would be nice to have a WebSocket that sends Snapshots as JSON, so I can contribute my Client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions