Пример #1
0
 public override void Write(Utf8JsonWriter writer, FlurlCookie value, JsonSerializerOptions options)
 {
     writer.WriteStartObject();
     writer.WriteString("OriginUrl", value.OriginUrl);
     writer.WriteDateTimeOffset("DateReceived", value.DateReceived);
     writer.WriteString("Name", value.Name);
     writer.WriteString("Value", value.Value);
     writer.WriteNullableDateTimeOffset("Expires", value.Expires);
     writer.WriteNullableNumber("MaxAge", value.MaxAge);
     writer.WriteString("Domain", value.Domain);
     writer.WriteString("Path", value.Path);
     writer.WriteBoolean("Secure", value.Secure);
     writer.WriteBoolean("HttpOnly", value.HttpOnly);
     writer.WriteNullableEnum("SameSite", value.SameSite);
     writer.WriteEndObject();
 }