serialize

open override fun serialize(src: Component, typeOfSrc: Type, context: JsonSerializationContext): JsonElement

Serializes Component to JsonElement.

Since

0.2.0

Return

The serialized Component

Parameters

src

The component

typeOfSrc

The type of the src parameter

context

The serialization context

Throws

JsonSyntaxException

If the component is invalid or the children/args/style can't be serialized