anthropics / anthropics/anthropic-sdk-csharp

Support AOT

Open
#79 6 comments 0 reactions 0 assignees View on GitHub
enhancement sdk
Dominant language
C#
Stars
322
Forks
105
Avg merge
1d 6h
Merged PRs (30d)
9

Description

Hello, would it be possible to utilize the [System.Text.Json Source Generators](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation) instead of the reflection-based approach?

In my app I have the reflection-based json serializing deactivated which resulted in the following exception occurring:
```
System.InvalidOperationException:
'Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.'
```

This would also be a step to make the library Native AOT compatible by default. 🙂

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.