Merge pull request #4568 from crobibero/guid-empty

Serialize Guid.Empty to null
pull/4574/head
Claus Vium 4 years ago committed by GitHub
commit 4ce9bf3fcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,6 +15,15 @@ namespace MediaBrowser.Common.Json.Converters
/// <inheritdoc />
public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options)
=> writer.WriteStringValue(value);
{
if (value == Guid.Empty)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(value);
}
}
}
}

Loading…
Cancel
Save