aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/activity
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-03-13 04:02:36 +0300
committerGravatar Vitaly Takmazov2024-03-13 04:02:36 +0300
commitd3eb799ea302b520ef253c53874a6fafe508409e (patch)
treea5b8e6d36f5fa19b5ff590c692edfdcfe9711c58 /src/main/java/com/juick/www/api/activity
parente43b64a9ea8bf80ec62cd59ad4eed19b112f5093 (diff)
Deserialize existing JSON-LD types using correct deserializer
Diffstat (limited to 'src/main/java/com/juick/www/api/activity')
-rw-r--r--src/main/java/com/juick/www/api/activity/model/Context.java2
-rw-r--r--src/main/java/com/juick/www/api/activity/model/activities/Flag.java1
2 files changed, 3 insertions, 0 deletions
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<String> 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<String> object;
public List<String> getObject() {