i18n-spigot/src/main/java/com/blackypaw/mc/i18n/chat/ChatComponentDeserializer.java
/**
	 * Detects the type of the given json element and deserializes its contents into the appropriate
	 * component types.
	 *
	 * @param json The json element to be deserialized
	 *
	 * @return The deserialized chat component
	 */
Detects the type of the given json element and deserializes its contents into the appropriate
component types.

@param json The json element to be deserialized

@return The deserialized chat component
Detects the type of the given json element and deserializes its contents into the appropriate component types . @param json The json element to be deserialized @return The deserialized chat component
private ChatComponent deserializeComponent( JsonElement json ) {
		if ( json.isJsonPrimitive() ) {
			return this.deserializeTextComponent( json );
		} else if ( json.isJsonArray() ) {
			return this.deserializeComponentArray( json.getAsJsonArray() );
		} else {
			return this.deserializeTextComponent( json );
		}
	}
private ChatComponent deserializeComponent ( JsonElement json ) { if ( json . isJsonPrimitive ( ) ) { return this . deserializeTextComponent ( json ) ; } else if ( json . isJsonArray ( ) ) { return this . deserializeComponentArray ( json . getAsJsonArray ( ) ) ; } else { return this . deserializeTextComponent ( json ) ; } }
Detects the type of the given json element and deserializes its contents into the appropriate
 component types.
Detects the type of the given json element and deserializes its contents into the appropriate component types .
// Only text components can be raw primitives (strings): // Only text components can be json arrays: