in.virit.emit.EcardReadoutEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of emit-reading-api Show documentation
Show all versions of emit-reading-api Show documentation
Java/Vaadin API for Emit sport timing gear gear
The newest version!
package in.virit.emit;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
public record EcardReadoutEvent(
int ecardNumber,
int ecardProductionWeek,
int ecardProductionYear,
boolean validEcardCheckByte,
List controlCodes,
String emitTimeSystemString,
String disp1,
String disp2,
String disp3,
boolean validTransferCheckByte,
boolean finishedReading
) {
private static final ObjectMapper objectMapper = new ObjectMapper();
public static EcardReadoutEvent fromJson(String json) {
try {
return objectMapper.readValue(json, EcardReadoutEvent.class);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
}