All Downloads are FREE. Search and download functionalities are using the official Maven repository.

in.virit.emit.EcardReadoutEvent Maven / Gradle / Ivy

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);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy