commonMain.com.bselzer.ktx.serialization.serializer.GeometryModules.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geometry-serialization-jvm Show documentation
Show all versions of geometry-serialization-jvm Show documentation
kotlinx.serialization for two and three dimensional geometrical objects.
package com.bselzer.ktx.serialization.serializer
import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.contextual
import kotlinx.serialization.modules.plus
object GeometryModules {
val TWO_DIMENSIONAL = SerializersModule {
contextual(DigonSerializer())
contextual(Dimension2DSerializer())
contextual(Point2DSerializer())
contextual(QuadrilateralSerializer())
}
val THREE_DIMENSIONAL = SerializersModule {
contextual(Point3DSerializer())
}
val ALL: SerializersModule = TWO_DIMENSIONAL + THREE_DIMENSIONAL
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy