convertToJson

abstract fun convertToJson(text: T): String

Converts a value of type T to a JSON string.

Return

A JSON string representing the converted text.

Parameters

text

The value of type T to be converted.


Converts a McTextComponent to a JSON string.

Return

A JSON string representing the converted text component.

Parameters

text

The McTextComponent to be converted.