From d3eb799ea302b520ef253c53874a6fafe508409e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 13 Mar 2024 04:02:36 +0300 Subject: Deserialize existing JSON-LD types using correct deserializer --- src/main/java/com/juick/www/api/activity/model/Context.java | 2 ++ src/main/java/com/juick/www/api/activity/model/activities/Flag.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/com/juick/www/api/activity/model/Context.java b/src/main/java/com/juick/www/api/activity/model/Context.java index 80694b7a..212e2e28 100644 --- a/src/main/java/com/juick/www/api/activity/model/Context.java +++ b/src/main/java/com/juick/www/api/activity/model/Context.java @@ -19,6 +19,7 @@ package com.juick.www.api.activity.model; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.juick.www.api.activity.helpers.ActivityIdDeserializer; import com.juick.www.api.activity.helpers.ContextTypeFilter; import com.juick.www.api.activity.helpers.LinkValueDeserializer; import com.juick.www.api.activity.model.activities.*; @@ -113,6 +114,7 @@ public class Context implements Serializable { } @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + @JsonDeserialize(contentUsing = ActivityIdDeserializer.class) public List getTo() { return to; } diff --git a/src/main/java/com/juick/www/api/activity/model/activities/Flag.java b/src/main/java/com/juick/www/api/activity/model/activities/Flag.java index 1c37dec0..e4216ae1 100644 --- a/src/main/java/com/juick/www/api/activity/model/activities/Flag.java +++ b/src/main/java/com/juick/www/api/activity/model/activities/Flag.java @@ -44,6 +44,7 @@ public class Flag extends Context { } @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + @JsonDeserialize(contentUsing = ActivityIdDeserializer.class) private List object; public List getObject() { -- cgit v1.2.3