Fix json array string writer in JsonDelimitedArrayConverter (#12949)

pull/12962/head
gnattu 4 months ago committed by GitHub
parent 954950dc14
commit 3089e9e40a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -71,24 +71,11 @@ namespace Jellyfin.Extensions.Json.Converters
writer.WriteStartArray(); writer.WriteStartArray();
if (value.Length > 0) if (value.Length > 0)
{ {
var toWrite = value.Length - 1;
foreach (var it in value) foreach (var it in value)
{ {
var wrote = false;
if (it is not null) if (it is not null)
{ {
writer.WriteStringValue(it.ToString()); writer.WriteStringValue(it.ToString());
wrote = true;
}
if (toWrite > 0)
{
if (wrote)
{
writer.WriteStringValue(Delimiter.ToString());
}
toWrite--;
} }
} }
} }

Loading…
Cancel
Save