2020-10-11 16:45:45 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Common.Json.Converters
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Convert comma delimited string to array of type.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T">Type to convert to.</typeparam>
|
2021-05-06 14:16:52 -07:00
|
|
|
|
public sealed class JsonCommaDelimitedArrayConverter<T> : JsonDelimitedArrayConverter<T>
|
2020-10-11 16:45:45 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="JsonCommaDelimitedArrayConverter{T}"/> class.
|
|
|
|
|
/// </summary>
|
2021-05-06 14:16:52 -07:00
|
|
|
|
public JsonCommaDelimitedArrayConverter() : base()
|
2020-10-11 16:45:45 -07:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2021-05-06 14:16:52 -07:00
|
|
|
|
protected override char Delimiter => ',';
|
2020-10-11 16:45:45 -07:00
|
|
|
|
}
|
2020-11-14 07:47:34 -07:00
|
|
|
|
}
|