Implemented DLSiteClient.

This commit is contained in:
2025-09-08 17:08:47 -04:00
parent 429252e61f
commit f250276a99
39 changed files with 1584 additions and 173 deletions

View File

@@ -0,0 +1,22 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace JSMR.Infrastructure.Integrations.DLSite.Serialization;
public sealed class ProductInfoOptionsConverter : JsonConverter<string[]>
{
public override string[] Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
string value = reader.GetString() ?? string.Empty;
if (string.IsNullOrEmpty(value))
return [];
return [.. value.Split('#')];
}
public override void Write(Utf8JsonWriter writer, string[] value, JsonSerializerOptions options)
{
writer.WriteStringValue(string.Join("#", value));
}
}