diff --git a/src/main/kotlin/dev/usbharu/hideout/ap/JsonLd.kt b/src/main/kotlin/dev/usbharu/hideout/ap/JsonLd.kt index 951bf00f..2cda262c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/ap/JsonLd.kt +++ b/src/main/kotlin/dev/usbharu/hideout/ap/JsonLd.kt @@ -3,10 +3,14 @@ package dev.usbharu.hideout.ap import com.fasterxml.jackson.annotation.JsonAutoDetect import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.core.TreeNode +import com.fasterxml.jackson.databind.JsonDeserializer +import com.fasterxml.jackson.databind.annotation.JsonDeserialize @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) open class JsonLd { @JsonProperty("@context") + @JsonDeserialize(using = ContextDeserializer::class) var context:List = emptyList() @JsonCreator @@ -16,3 +20,9 @@ open class JsonLd { protected constructor() } + +public class ContextDeserializer : JsonDeserializer>() { + override fun deserialize(p0: com.fasterxml.jackson.core.JsonParser?, p1: com.fasterxml.jackson.databind.DeserializationContext?): List { + return emptyList() + } +}