You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Recursion Limit/maxRecursion for SerializerBuilder/objectGraphTraversalStrategyFactory seems to be hardcoded to 50.
This is quite inflexible. As it means that someone who happens to have a tree with a depth greater than 50 (for example an application I am writing: Kata) simply gets the error "Too much recursion when traversing the object graph." Ideally this would be simply changed to an optional argument in SerializerBuilder.
The 50 number is used
on what is currently line 72 in the SerializerBuilder constructor: objectGraphTraversalStrategyFactory = (typeInspector, typeResolver, typeConverters) => new FullObjectGraphTraversalStrategy(typeInspector, typeResolver, 50, namingConvention ?? new NullNamingConvention());
I totally agree. I have a method named WithMaximumRecursion that allows you to specify the value for the limit.
A pre-release package should be available on NuGet soon. I would apreciate if you could try it and confirm if it addresses your needs. The version is 5.1.1-issue-352-max-recursion0504
Currently the Recursion Limit/maxRecursion for SerializerBuilder/objectGraphTraversalStrategyFactory seems to be hardcoded to 50.
This is quite inflexible. As it means that someone who happens to have a tree with a depth greater than 50 (for example an application I am writing: Kata) simply gets the error "Too much recursion when traversing the object graph." Ideally this would be simply changed to an optional argument in SerializerBuilder.
The 50 number is used
on what is currently line 72 in the SerializerBuilder constructor:
objectGraphTraversalStrategyFactory = (typeInspector, typeResolver, typeConverters) => new FullObjectGraphTraversalStrategy(typeInspector, typeResolver, 50, namingConvention ?? new NullNamingConvention());
Link to file with hard coded value: SerializerBuilder .
The text was updated successfully, but these errors were encountered: