diff options
| author | crobibero <cody@robibe.ro> | 2020-12-07 15:23:25 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-12-07 15:23:25 -0700 |
| commit | 6722fcec363a5f2e6ed85ac0609c250fb078155b (patch) | |
| tree | 7ca9c57f1d965c0e210c411f49b4ffe8d1219ff1 | |
| parent | a7b461adb472eb4591922e921e683b26ded87251 (diff) | |
Revert #4568
| -rw-r--r-- | MediaBrowser.Common/Json/Converters/JsonGuidConverter.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/MediaBrowser.Common/Json/Converters/JsonGuidConverter.cs b/MediaBrowser.Common/Json/Converters/JsonGuidConverter.cs index 52e08d071..ccf214e3c 100644 --- a/MediaBrowser.Common/Json/Converters/JsonGuidConverter.cs +++ b/MediaBrowser.Common/Json/Converters/JsonGuidConverter.cs @@ -13,21 +13,13 @@ namespace MediaBrowser.Common.Json.Converters public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { var guidStr = reader.GetString(); - return guidStr == null ? Guid.Empty : new Guid(guidStr); } /// <inheritdoc /> public override void Write(Utf8JsonWriter writer, Guid value, JsonSerializerOptions options) { - if (value == Guid.Empty) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(value); - } + writer.WriteStringValue(value); } } } |
