/// <inheritdoc /> public void WriteTo(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WriteStringIfNotWhiteSpace("type", Type); writer.WriteStringIfNotWhiteSpace("value", Value); writer.WriteStringIfNotWhiteSpace("module", Module); writer.WriteNumberIfNotNull("thread_id", ThreadId.NullIfDefault()); writer.WriteSerializableIfNotNull("stacktrace", Stacktrace); writer.WriteSerializableIfNotNull("mechanism", Mechanism); writer.WriteEndObject(); }