Don't embed condition json by default

This commit is contained in:
DBotThePony 2023-12-31 22:23:16 +07:00
parent 5d15611f84
commit f942093e4f
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -10,7 +10,7 @@ import ru.dbotthepony.mc.otm.core.fromJsonStrict
import ru.dbotthepony.mc.otm.core.set
import ru.dbotthepony.mc.otm.core.toJsonStrict
class Codec2Serializer<T : Any>(val codec: Codec<T>, val embed: Boolean = true) : Serializer<T> {
class Codec2Serializer<T : Any>(val codec: Codec<T>, val embed: Boolean = false) : Serializer<T> {
override fun serialize(data: JsonObject, value: T, context: JsonSerializationContext) {
if (embed) {
val result = codec.toJsonStrict(value, data)