JsonPipeDelimitedArrayConverter.cs 719 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.ComponentModel;
  3. using System.Text.Json;
  4. using System.Text.Json.Serialization;
  5. namespace MediaBrowser.Common.Json.Converters
  6. {
  7. /// <summary>
  8. /// Convert Pipe delimited string to array of type.
  9. /// </summary>
  10. /// <typeparam name="T">Type to convert to.</typeparam>
  11. public sealed class JsonPipeDelimitedArrayConverter<T> : JsonDelimitedArrayConverter<T>
  12. {
  13. /// <summary>
  14. /// Initializes a new instance of the <see cref="JsonPipeDelimitedArrayConverter{T}"/> class.
  15. /// </summary>
  16. public JsonPipeDelimitedArrayConverter() : base()
  17. {
  18. }
  19. /// <inheritdoc />
  20. protected override char Delimiter => '|';
  21. }
  22. }