Added handling of Instant as string

This commit is contained in:
Andreas Isler
2025-11-14 07:58:44 +01:00
parent 5e689df3c5
commit d1b52a6ba3
@@ -2,6 +2,7 @@ package com.example.parser;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
@@ -20,8 +21,9 @@ public class FlowableExcelMapper {
protected static FlowableExcelParser flowableExcelParser = new FlowableExcelParser();
public FlowableExcelMapper() {
// Enable ObjectMapper for handling Instant
// Enable ObjectMapper for handling Instant as string
objectMapper.registerModule(javaTimeModule);
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
}
// excelPath defines the location of the Excel file