From 852ee6a66a7aa7ae96b94defcd44494b0e71b02f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 27 May 2019 14:19:05 +0300 Subject: ActivityPub: deserialize activities with single context --- src/main/java/com/juick/server/api/activity/model/Context.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/server/api/activity/model/Context.java b/src/main/java/com/juick/server/api/activity/model/Context.java index 2ba4606e..1d3f238c 100644 --- a/src/main/java/com/juick/server/api/activity/model/Context.java +++ b/src/main/java/com/juick/server/api/activity/model/Context.java @@ -1,9 +1,6 @@ package com.juick.server.api.activity.model; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.juick.server.api.activity.helpers.LinkValueDeserializer; import com.juick.server.api.activity.model.activities.*; @@ -68,6 +65,7 @@ public abstract class Context { } @JsonProperty("@context") + @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) public List getContext() { return context; } -- cgit v1.2.3