jellyfin/src/Jellyfin.Extensions/Json/Converters/JsonCommaDelimitedCollectionConverter.cs
Bond-009 2db0750abb
Make the JsonConverters for delimited arrays more generic (#13396)
* Make the JsonConverters for delimited arrays more generic

Also adds some tests for serialization (with different types) as we didn't have any before.

* Ignore warnings
2025-02-13 20:24:55 -07:00

20 lines
639 B
C#

namespace Jellyfin.Extensions.Json.Converters
{
/// <summary>
/// Convert comma delimited string to collection of type.
/// </summary>
/// <typeparam name="T">Type to convert to.</typeparam>
public sealed class JsonCommaDelimitedCollectionConverter<T> : JsonDelimitedCollectionConverter<T>
{
/// <summary>
/// Initializes a new instance of the <see cref="JsonCommaDelimitedCollectionConverter{T}"/> class.
/// </summary>
public JsonCommaDelimitedCollectionConverter() : base()
{
}
/// <inheritdoc />
protected override char Delimiter => ',';
}
}