Uh oh!
There was an error while loading. Please reload this page.
Disable fast path serialization for types with properties using custom converters. - #58291
Conversation
ghost
commented
Aug 27, 2021
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsDisables fast path serialization for types with properties using custom converters. While technically it should be possible to support fast path serialization for this scenario, it would require making the Fixes #58119.
|
eiriktsarpalis
commented
Aug 27, 2021
Should be backported to release/6.0 |
Uh oh!
There was an error while loading. Please reload this page.
steveharter
commented
Aug 28, 2021
Why is this? I assume we just need to call |
eiriktsarpalis
commented
Aug 28, 2021
property-level converters need to be instantiated and cached with property-level metadata (otherwise we would have to allocate a new converter on each serialization). We currently do cache a |
steveharter
commented
Aug 31, 2021
The long-term and more ideal implementation is to use the property-level converter in the fast-path, meaning add the new serializer-gen interop API (it will need to be |
steveharter
left a comment
There was a problem hiding this comment.
At this point, we should disable fast path and use serializer, and fix this in 7.0.
Also this PR needs to get in before the "property factory" support in #58267 is added, since fast path also needs to be disabled for properties that have factory converters.
steveharter
commented
Sep 2, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1195028196 |
Disables fast path serialization for types with properties using custom converters. While technically it should be possible to support fast path serialization for this scenario, it would require making the
JsonPropertyInfo.ConverterBaseproperty public. We should consider doing this in .NET 7.Fixes#58119.