diff --git a/src/Verify.SourceGenerators/Converters/DiagnosticConverter.cs b/src/Verify.SourceGenerators/Converters/DiagnosticConverter.cs index ac4dec6..bf7f7b2 100644 --- a/src/Verify.SourceGenerators/Converters/DiagnosticConverter.cs +++ b/src/Verify.SourceGenerators/Converters/DiagnosticConverter.cs @@ -7,9 +7,9 @@ public override void Write(VerifyJsonWriter writer, Diagnostic value) writer.WriteMember(value, value.Id, "Id"); var descriptor = value.Descriptor; writer.WriteMember(value, descriptor.Title, "Title"); - writer.WriteMember(value, value.Severity.ToString(), "Severity"); + writer.WriteMember(value, value.Severity, "Severity"); writer.WriteMember(value, value.WarningLevel, "WarningLevel"); - writer.WriteMember(value, value.Location.GetMappedLineSpan().ToString(), "Location"); + writer.WriteMember(value, value.Location.GetMappedLineSpan(), "Location"); var description = descriptor.Description.ToString(CultureInfo.InvariantCulture); if (!string.IsNullOrWhiteSpace(description)) {