ColorSerializationAdapter

open class ColorSerializationAdapter : JsonSerializer<Color> , JsonDeserializer<Color>

This class should be registered in a com.google.gson.GsonBuilder to serialize and deserialize JavaFX Color objects.

Functions

Link copied to clipboard
open fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Color
Link copied to clipboard
open fun readColor(stream: ObjectInputStream): Color
Generalized way to deserialize a JavaFX Color from a stream.
Link copied to clipboard
open fun serialize(src: Color, typeOfSrc: Type, context: JsonSerializationContext): JsonElement
Link copied to clipboard
open fun writeColor(stream: ObjectOutputStream, color: Color)
Generalized way to serialize JavaFX Color on a stream.