0

The Max depth of the json is more than 200 due to which while inserting data into mongo Db its failing with above error.. Any help would be appreciated

I tried setting this value :

BsonDefaults.MaxSerializationDepth = 1000;

but no luck has the Bson document Max is 200 ..

sehu
  • 1
  • 1
  • the officially recommended by mongoDB depth is 100 ( https://www.mongodb.com/docs/manual/reference/limits/ ) even in some cases up to 200 is possible: https://jira.mongodb.org/browse/DOCS-10578 – R2D2 Nov 11 '22 at 12:22

1 Answers1

0

The official advice is still the case that you should restrict your use cases to 100 levels of nesting or less; the server just happens to allow for some slack.

Similar answers on the stackoverflow:

Viachaslau S
  • 106
  • 1
  • 5