Handle conversions from object arrays to strings

This commit is contained in:
Sipke Schoorstra 2023-10-13 12:17:00 +02:00
parent 2d3c13f745
commit fa18303198

View file

@ -130,6 +130,10 @@ public static class ObjectConverter
}
}
if (typeof(IEnumerable<object>).IsAssignableFrom(underlyingSourceType))
if (underlyingTargetType == typeof(string))
return JsonSerializer.Serialize(value);
var targetTypeConverter = TypeDescriptor.GetConverter(underlyingTargetType);
if (targetTypeConverter.CanConvertFrom(underlyingSourceType))