Closed Simonl9l closed 2 months ago
If you set it in JsonSerializerOptions, any JsonSerializerContext will be used. I don't think there's any problem with that.
I've not set up a test to enable and to re-validate this, but believe that we'll run into AoT issues (warnings at least) if one passes in the serializer via a JsonSerializerOptions as it does (from recollection) not pickup the JsonSerializerContext semantics.
If I get a chance I'll reverify.
Today it seem that serialization options can be provided via
ConsoleApp.JsonSerializerOptions
, and this is used when deserializingObject
bindings?Given the code generated nature and implicit support for AoT, it also seems sensible to support Code Generated Serializers and specifically
JsonSerializerContext
. Is it intended to configure this like so:I'm not sure if this generated code, actually leverages the code generates serializer:
I'd expect it more to be: