Skip to content

Serialization options (IgnoreCycles) #7237

@KoalaBear84

Description

@KoalaBear84

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions