PositionSerializer

object PositionSerializer : KSerializer<Position>

KSerializer implementation for implementations of the Position interface. Serializes a Position down to an array of numbers as specified by GeoJSON. This serializer only works for converting to and from JSON. A position maps to [longitude, latitude, altitude].

A position's altitude is only included in the array if it is not null.

An instance of the serializer can be obtained from the Position.Companion.serializer extension function.

See also

Position.Companion.serializer

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): Position
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: Position)