Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
<groupId>io.openapitools.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-hal</artifactId>
</dependency>
<dependency>
<groupId>io.cloudevents</groupId>
<artifactId>cloudevents-api</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
8 changes: 0 additions & 8 deletions core/src/main/java/com/adobe/aio/util/JacksonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.node.TextNode;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import io.cloudevents.json.ZonedDateTimeDeserializer;
import io.cloudevents.json.ZonedDateTimeSerializer;
import io.openapitools.jackson.dataformat.hal.JacksonHALModule;
import java.time.ZonedDateTime;
import org.apache.commons.lang3.StringUtils;

public class JacksonUtil {
Expand All @@ -35,10 +31,6 @@ private JacksonUtil() {
JsonMapper.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.serializationInclusion(Include.NON_NULL)
.addModule(new SimpleModule()
.addSerializer(ZonedDateTime.class, new ZonedDateTimeSerializer())
.addDeserializer(ZonedDateTime.class, new ZonedDateTimeDeserializer()))
Comment on lines -38 to -40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we make sure that it won't fail in serialization/deserialization? Does Jackson support these date formats OOTB?

Copy link
Collaborator Author

@francoisledroff francoisledroff Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what matters here is the objectmapper pulled from here is properly serializating/deserializing dates/times when used with the models stuffed in our sdk, right ?
and I believe it's the case :
the only 2 dates found in our json model are actually currently exposed as String in the Registration class : they were no need for this in the first place ...

Copy link
Collaborator Author

@francoisledroff francoisledroff Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the only place where we used Date type in our jackson powered model are in the aem module when serializing aem event

// let's stick to CloudEvents v1 ISO_OFFSET_DATE_TIME date format
.addModule(new JacksonHALModule())
.addModule(new Jdk8Module())
.build();
Expand Down
9 changes: 0 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@
<jackson.version>2.13.4</jackson.version>
<jjwt.version>0.11.5</jjwt.version>

<cloudevents.version>1.2.0</cloudevents.version>
<!-- we'll stick to this CloudEvents v1 version for now -->

<!-- https://github.com/openapi-tools/jackson-dataformat-hal/blob/v1.0.9/pom.xml -->
<jackson-dataformat-hal.version>1.0.9</jackson-dataformat-hal.version>

Expand All @@ -124,12 +121,6 @@
<version>${commons-text.version}</version>
</dependency>

<dependency>
<groupId>io.cloudevents</groupId>
<artifactId>cloudevents-api</artifactId>
<version>${cloudevents.version}</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down