aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs')
-rw-r--r--src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs b/src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs
new file mode 100644
index 000000000..57378a360
--- /dev/null
+++ b/src/Jellyfin.Extensions/Json/Converters/JsonPipeDelimitedCollectionConverter.cs
@@ -0,0 +1,19 @@
+namespace Jellyfin.Extensions.Json.Converters
+{
+ /// <summary>
+ /// Convert Pipe delimited string to array of type.
+ /// </summary>
+ /// <typeparam name="T">Type to convert to.</typeparam>
+ public sealed class JsonPipeDelimitedCollectionConverter<T> : JsonDelimitedCollectionConverter<T>
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="JsonPipeDelimitedCollectionConverter{T}"/> class.
+ /// </summary>
+ public JsonPipeDelimitedCollectionConverter() : base()
+ {
+ }
+
+ /// <inheritdoc />
+ protected override char Delimiter => '|';
+ }
+}