Web Services
live.web().addService("/tutorial", new SomeResource(live))@Path("/")
@Produces("application/json")
public class SomeResource {
private final String ships;
public SomeResource(Live live) {
this.ships = live.settings().root().cd("tutorial").raw();
}
@GET
@Path("/ships")
public JsonArray ships() {
return LiveJson.fromJson(this.ships, JsonArray.class);
}
}
Last updated