jvmMain.it.unibo.tuprolog.serialize.JvmTermDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serialize-core-jvm Show documentation
Show all versions of serialize-core-jvm Show documentation
JSON and YAML serialization support for logic terms and clauses
The newest version!
package it.unibo.tuprolog.serialize
import it.unibo.tuprolog.core.Term
import java.io.Reader
internal class JvmTermDeserializer(override val mimeType: MimeType) : ReadingTermDeserializer {
private val mapper = mimeType.objectMapper
override fun deserialize(reader: Reader): Term =
JvmTermDeobjectifier().deobjectify(
mapper.readValue(reader, java.lang.Object::class.java),
)
override fun deserializeMany(reader: Reader): Iterable =
JvmTermDeobjectifier().deobjectifyMany(
mapper.readValue(reader, java.lang.Object::class.java),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy