mirror of https://github.com/jellyfin/jellyfin.git
Serialize Guid.Empty to null
This commit is contained in:
parent
02c1879533
commit
c4925ad70b
|
@ -15,6 +15,15 @@ namespace MediaBrowser.Common.Json.Converters
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options)
|
public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options)
|
||||||
=> writer.WriteStringValue(value);
|
{
|
||||||
|
if (value == Guid.Empty)
|
||||||
|
{
|
||||||
|
writer.WriteNullValue();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writer.WriteStringValue(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue