mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-24 19:14:56 +01:00
Merge pull request #4730 from crobibero/base-item-dto-guid-nullable
Don't serialize empty GUID to null
(cherry picked from commit b6ecaccf92)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
11a37884f0
commit
aae90a8480
@@ -3,7 +3,7 @@ using System.Text.Json;
|
||||
using MediaBrowser.Common.Json.Converters;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Common.Tests.Extensions
|
||||
namespace Jellyfin.Common.Tests.Json
|
||||
{
|
||||
public class JsonGuidConverterTests
|
||||
{
|
||||
@@ -44,9 +44,9 @@ namespace Jellyfin.Common.Tests.Extensions
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Serialize_EmptyGuid_Null()
|
||||
public void Serialize_EmptyGuid_EmptyGuid()
|
||||
{
|
||||
Assert.Equal("null", JsonSerializer.Serialize(Guid.Empty, _options));
|
||||
Assert.Equal($"\"{Guid.Empty}\"", JsonSerializer.Serialize(Guid.Empty, _options));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user