-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
The reader's MaxDepth of 64 has been exceeded #284
Comments
Ah, it is configurable! Maximum depthThe latest version of Newtonsoft.Json has a maximum depth limit of 64 by default. System.Text.Json also has a default limit of 64, and it's configurable by setting JsonSerializerOptions.MaxDepth. If you're using System.Text.Json indirectly by using ASP.NET Core, the default maximum depth limit is 32. The default value is the same as for model binding and is set in the JsonOptions class. |
Source - MaxDepth setting - Json.NET Documentation - newtonsoft.com MaxDepth settingThis sample uses the MaxDepth setting to constrain JSON to a maximum depth when deserializing. Sample: |
Added row to indicate new, non default, MaxDepth, Re pbi-tools#284
We ran pbitools.exe extract Dashbord XXXX.pbix and we get this error message.
If I take the line 1 and replace the period, I have 62 rows... hmm... each one creates a depth in the indentation?
Can we change the MaxDepth to 128? or 1024 or 8192?
:)
An unhandled exception occurred.
Newtonsoft.Json.JsonReaderException: The reader's MaxDepth of 64 has been exceeded. Path 'bookmarks[18].explorationState.sections.ReportSection227598f4bf4b2761c77a.visualContainers.97e8dfb9dfbc662ad879.filters.byName.Filterf29b284743a718774aa2.filter.Where[0].Condition.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.And.Left.Not.Expression.Comparison.Left.Column.Expression', line 1, position 1283486.
at Newtonsoft.Json.JsonReader.Push(JsonContainerType value)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.ReadFrom(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at PbiTools.Utils.JsonExtensions.ExtractToken[T](JObject parent, String property, IProjectFolder folder)
at PbiTools.Serialization.ReportSerializer.Serialize(JObject content)
at PbiTools.Model.PbixModel.ToFolder(String path, PbixProjectSettings settings)
at PbiTools.Cli.CmdLineActions.Extract(String pbixPath, Nullable
1 pid, Nullable
1 pbiPort, String extractFolder, ExtractActionCompatibilityMode mode, ModelSerializationMode modelSerialization, MashupSerializationMode mashupSerialization, Boolean watch)--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at PowerArgs.ArgAction.Invoke()
at PbiTools.Program.Main(String[] args)
The text was updated successfully, but these errors were encountered: