mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Merge pull request #4568 from crobibero/guid-empty
Serialize Guid.Empty to null
This commit is contained in:
		
						commit
						4ce9bf3fcf
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user