mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-22 21:49:46 +00:00
Backport pull request #12949 from jellyfin/release-10.10.z
Fix json array string writer in JsonDelimitedArrayConverter
Original-merge: 3089e9e40a
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
4f562d67b0
commit
19c5c95f4e
@ -70,24 +70,11 @@ namespace Jellyfin.Extensions.Json.Converters
|
||||
writer.WriteStartArray();
|
||||
if (value.Length > 0)
|
||||
{
|
||||
var toWrite = value.Length - 1;
|
||||
foreach (var it in value)
|
||||
{
|
||||
var wrote = false;
|
||||
if (it is not null)
|
||||
{
|
||||
writer.WriteStringValue(it.ToString());
|
||||
wrote = true;
|
||||
}
|
||||
|
||||
if (toWrite > 0)
|
||||
{
|
||||
if (wrote)
|
||||
{
|
||||
writer.WriteStringValue(Delimiter.ToString());
|
||||
}
|
||||
|
||||
toWrite--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user