Skip to content

Serialization options (IgnoreCycles) #7237

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

Closed
KoalaBear84 opened this issue Feb 17, 2023 · 1 comment
Closed

Serialization options (IgnoreCycles) #7237

KoalaBear84 opened this issue Feb 17, 2023 · 1 comment

Comments

@KoalaBear84
Copy link

KoalaBear84 commented Feb 17, 2023

Is your feature request related to a problem? Please describe.
Cannot serialize objects with cyclic references.

Describe the solution you'd like
An option to add/set IgnoreCycles.

Describe alternatives you've considered
Serialize it myself, but then it will not respect the elasticSearch default naming conventions etc.

Additional context
https://discuss.elastic.co/t/elastic-clients-elasticsearch-8-x-custom-serialization/324435

A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 64. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. Path: $.ModifiedFields.Old.Languages.Parent.Parent.Parent.Parent.Parent.Parent.etc

@stevejgordon
Copy link
Contributor

@KoalaBear84, thanks for raising this. I will close it as it's covered in #7238 and something we are looking to support.

@stevejgordon stevejgordon closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants