oops
This commit is contained in:
parent
73e082aeea
commit
d5bbd717b6
@ -32,6 +32,10 @@ class Codec2Serializer<T : Any>(val codec: Codec<T>, val embed: Boolean = true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun deserialize(p_79323_: JsonObject, p_79324_: JsonDeserializationContext): T {
|
override fun deserialize(p_79323_: JsonObject, p_79324_: JsonDeserializationContext): T {
|
||||||
return codec.fromJsonStrict(p_79323_["value"] ?: throw JsonSyntaxException("Missing 'value' element"))
|
if (embed) {
|
||||||
|
return codec.fromJsonStrict(p_79323_)
|
||||||
|
} else {
|
||||||
|
return codec.fromJsonStrict(p_79323_["value"] ?: throw JsonSyntaxException("Missing 'value' element"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user