KytaleSerializersModule
Default SerializersModule for Kytale.
This module provides kotlinx.serialization support for 27 Hytale domain types including:
Vector types (Vector3d, Vector3i, Vector3f, Vector2d, Vector2i, Vector3l, Vector2l, Vector4d, Vec2f, Vec3f, Vec4f)
Transform and Location types
Math types (Quatf, Mat4f)
Range types (IntRange, FloatRange)
Shape types (Box, Box2D, Ellipsoid, Cylinder)
Component types (WorldGenId, NetworkId, UUIDComponent)
Player data types (PlayerDeathPositionData, PlayerRespawnPointData)
Version types (Semver)
Example usage:
val json = Json {
serializersModule = KytaleSerializersModule
}
val vector = Vector3d(1.0, 2.0, 3.0)
val jsonString = json.encodeToString(vector)Content copied to clipboard