class ParseService {

    public byte[] generateFileByPayload(DataPayload data) {
        try {
            return objectMapper.writeValueAsBytes(data);
        } catch (JsonProcessingException e) {
            log.error("Could not write bytes");
            return new byte[]{};
        }
    }

}