-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
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
Added ReferenceResolverProvider to JsonSerializer to allow safe caching #1393
Added ReferenceResolverProvider to JsonSerializer to allow safe caching #1393
Conversation
The reason I left JsonSerializer with a property that returns IReferenceResolver is the property can be used inside a JsonConverter's WriteJson/ReadJson (each has a JsonSerializer parameter). A func that returns a new instance each time will break people who want to use the resolver inside a converter. |
Hmm, could |
No. References are specific to serialization. |
…verter's access to the currently used IReferenceResolver.
It seems to me that Basically, it's either this or |
Hmm, maybe we could use a |
…nSerializerProxy to use the internal serializer's ReferenceResolver.
I just implemented what I proposed above. It looks like a |
I just realized you baked your This has been implemented in the PR. |
Resolved merge conflicts |
@JamesNK Please review when you have the time. Thanks. |
I am experiencing this bug in production, please accept this PR |
This PR does not fixes the issue, so don't merge. |
Closing due to age. |
Fixes #1391
Fixes #1452
Fixes #870