We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was testing with a simple application with Native AOT and got problems:
using Docker.DotNet; using Docker.DotNet.Models; var client = new DockerClientConfiguration() .CreateClient(); var param = new ImagesListParameters { All = true }; var images = await client.Images.ListImagesAsync(param);
This sample only works if i add <TrimMode>partial</TrimMode> to my csproject, add this class:
<TrimMode>partial</TrimMode>
namespace Docker.DotNet; using System.Text.Json.Serialization; using Models; [JsonSerializable(typeof(ImagesListResponse[]))] [JsonSerializable(typeof(ImagesListParameters[]))] public partial class JsonSerializerContext :System.Text.Json.Serialization.JsonSerializerContext {}
And set the TypeInfoResolver on JsonSerializerOptions to JsonSerializerContext.Default.
TypeInfoResolver
JsonSerializerOptions
JsonSerializerContext.Default
It seems that all serializable models must be added to the JsonSerializerContext, are you planning to automate this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was testing with a simple application with Native AOT and got problems:
This sample only works if i add
<TrimMode>partial</TrimMode>
to my csproject, add this class:And set the
TypeInfoResolver
onJsonSerializerOptions
toJsonSerializerContext.Default
.It seems that all serializable models must be added to the JsonSerializerContext, are you planning to automate this?
The text was updated successfully, but these errors were encountered: