3 ms·
Yes, a limit per type. Not for the whole serialization.
by Arnavion 6y ago
Yes, a limit per type. Not for the whole serialization.
- shawnz 6y agoBut what if a type which you need to serialize wrongly doesn't set the limit? EDIT: I see your point now, thank you for explaining
- Arnavion 6y agoAgain, I'm not saying there shouldn't be a default limit. I'm saying the limit should be per type, not for the whole serialization. It can be something as trivial as "PSHashTable is allowed to serialize without limit. Every other type is limited to N levels, unless the user sets `$SERIALIZATION_LIMIT[System.Type]` to some other value." Or make the `-Depth` parameter a `Dictionary<System.Type, int>`.