mirror of https://github.com/usbharu/Hideout.git
feat: でシリアライザーを変更
This commit is contained in:
parent
3723e438d3
commit
e97a3e9e96
|
@ -3,10 +3,14 @@ package dev.usbharu.hideout.ap
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect
|
import com.fasterxml.jackson.annotation.JsonAutoDetect
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator
|
import com.fasterxml.jackson.annotation.JsonCreator
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
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)
|
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
|
||||||
open class JsonLd {
|
open class JsonLd {
|
||||||
@JsonProperty("@context")
|
@JsonProperty("@context")
|
||||||
|
@JsonDeserialize(using = ContextDeserializer::class)
|
||||||
var context:List<String> = emptyList()
|
var context:List<String> = emptyList()
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
|
@ -16,3 +20,9 @@ open class JsonLd {
|
||||||
|
|
||||||
protected constructor()
|
protected constructor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ContextDeserializer : JsonDeserializer<List<String>>() {
|
||||||
|
override fun deserialize(p0: com.fasterxml.jackson.core.JsonParser?, p1: com.fasterxml.jackson.databind.DeserializationContext?): List<String> {
|
||||||
|
return emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue