mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Backport pull request #12949 from jellyfin/release-10.10.z
Fix json array string writer in JsonDelimitedArrayConverter Original-merge: 3089e9e40aea4bfe2b99d8b8bd5fdf1dd9d37984 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();
|
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…
x
Reference in New Issue
Block a user