/// <inheritdoc /> public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger?logger) { writer.WriteStartObject(); writer.WriteStringDictionaryIfNotEmpty("env", InternalEnv !); writer.WriteStringDictionaryIfNotEmpty("other", InternalOther !); writer.WriteStringDictionaryIfNotEmpty("headers", InternalHeaders !); writer.WriteStringIfNotWhiteSpace("url", Url); writer.WriteStringIfNotWhiteSpace("method", Method); writer.WriteDynamicIfNotNull("data", Data, logger); writer.WriteStringIfNotWhiteSpace("query_string", QueryString); writer.WriteStringIfNotWhiteSpace("cookies", Cookies); writer.WriteEndObject(); }