fun convertFrom()

in dsl/kotless/kotless-lang/src/main/kotlin/io/kotless/dsl/conversion/ConversionService.kt [56:67]


        fun <T : Any> convertFrom(value: String, type: KType): T? {
            val result: T?
            for (conversion in registered) {
                result = try {
                    conversion.convertFrom(value, type.javaType) as T?
                } catch (e: Exception) {
                    continue
                }
                return result
            }
            throw ConversionException("No viable conversion from string found for $value and type $type")
        }