JsonCommaDelimitedArrayConverter.cs 723 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 comma delimited string to array of type.
  9. /// </summary>
  10. /// <typeparam name="T">Type to convert to.</typeparam>
  11. public sealed class JsonCommaDelimitedArrayConverter<T> : JsonDelimitedArrayConverter<T>
  12. {
  13. /// <summary>
  14. /// Initializes a new instance of the <see cref="JsonCommaDelimitedArrayConverter{T}"/> class.
  15. /// </summary>
  16. public JsonCommaDelimitedArrayConverter() : base()
  17. {
  18. }
  19. /// <inheritdoc />
  20. protected override char Delimiter => ',';
  21. }
  22. }