Closed
Description
I'm playing with utilizing the Source Generator approach in the Json Serializer in order to optimize performance of informers.
See these two docs:
- https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/
- https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation
Unfortunately, I've hit a snag due to the existing Json converters being internal.
Options:
- Make existing converters public
- Add Source Generation to this library
- It appears fairly simple to implement
-
KubernetesJson.AddJsonOptions(x => x.TypeInfoResolver = JsonTypeInfoResolver.Combine(SourceGenerationContext.Default, JsonSerializerOptions.Default.TypeInfoResolver)); [JsonSerializable(typeof(V1Node))] [JsonSerializable(typeof(V1Namespace))] .. add all other types internal partial class SourceGenerationContext : JsonSerializerContext { }
Thoughts?
### Tasks
- [ ] https://github.com/kubernetes-client/csharp/pull/1417
Metadata
Metadata
Assignees
Labels
No labels