diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-10-27 19:36:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 19:36:37 +0100 |
| commit | be2f27a0695e5f3102f79a2e246e971682cff603 (patch) | |
| tree | 8179a36a3a734666d4a5d9a147d999f821ec79c9 /tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs | |
| parent | 6cadbe8d9eb28230fd9476f318309cb95443fa59 (diff) | |
| parent | b2662894cf6e7e6b20d12ff22c79ee5159658a2a (diff) | |
Merge pull request #4312 from crobibero/json-array-converter
Add comma delimited string to array json converter
Diffstat (limited to 'tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs')
| -rw-r--r-- | tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs b/tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs new file mode 100644 index 000000000..9a6c382fe --- /dev/null +++ b/tests/Jellyfin.Common.Tests/Models/GenericBodyModel.cs @@ -0,0 +1,20 @@ +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using MediaBrowser.Common.Json.Converters; + +namespace Jellyfin.Common.Tests.Models +{ + /// <summary> + /// The generic body model. + /// </summary> + /// <typeparam name="T">The value type.</typeparam> + public class GenericBodyModel<T> + { + /// <summary> + /// Gets or sets the value. + /// </summary> + [SuppressMessage("Microsoft.Performance", "CA1819:Properties should not return arrays", MessageId = "Value", Justification = "Imported from ServiceStack")] + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + public T[] Value { get; set; } = default!; + } +}
\ No newline at end of file |
