Umlaute, fix

This commit is contained in:
2026-08-05 11:34:57 +02:00
parent 9591e401f1
commit 81ce778b58

View File

@@ -12,26 +12,18 @@ namespace AICore.Context.SummaryParser
{
internal class JsonContextSummaryParser : BaseContextSummaryParser
{
private readonly JsonSerializerOptions JsonOptions = new JsonSerializerOptions()
{
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
IncludeFields = true,
};
public override string Parse(AiActionType actionType, IContextSummary context)
{
var options = new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, IncludeFields = true };
if (context is null)
return "{}";
var json = "{}";
if(context is ServiceRecordDocumantationFCS fcs)
{
json = JsonSerializer.Serialize(fcs, options);
}
else if(context is ServiceRecordNavigationCS ncs)
{
json = JsonSerializer.Serialize(ncs, options);
}
else
{
json = JsonSerializer.Serialize(context, options);
}
return json;
return JsonSerializer.Serialize(context, context.GetType(), JsonOptions);
}
}
}