jellyfin/MediaBrowser.Common/Json/Converters/JsonPipeDelimitedArrayConverter.cs

25 lines
719 B
C#
Raw Normal View History

using System;
using System.ComponentModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace MediaBrowser.Common.Json.Converters
{
/// <summary>
/// Convert Pipe 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 JsonPipeDelimitedArrayConverter<T> : JsonDelimitedArrayConverter<T>
{
/// <summary>
/// Initializes a new instance of the <see cref="JsonPipeDelimitedArrayConverter{T}"/> class.
/// </summary>
2021-05-06 14:16:52 -07:00
public JsonPipeDelimitedArrayConverter() : base()
{
}
/// <inheritdoc />
2021-05-06 14:16:52 -07:00
protected override char Delimiter => '|';
}
}