All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.bselzer.ktx.serialization.serializer.GeometryModules.kt Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
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