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
Although it is not possible to define maximum depth, I am not sure I would want that. If it stopped writing or reading at a certain depth, the resulting graph would be incomplete and therefore potentially untrustworthy.
I would like to point out that although the parser uses a stack-based parse, the conversion from Maps to Objects uses an explicit Stack object (limited only by the size of the heap). Similarly, the writer uses an explicit Stack for tracing the graph to find references (limited only by the size of the heap) but it does uses the Java stack while writing.
On my list of 'TODO's' for json-io, is to convert those final two instances of recursion to use an explicit stack, thereby making all graph traversal bound only by heap size. I plan to attack the parser first, release with that, and then the writer. This will not happen soon (in next couple of weeks), but it will happen.
it is sometimes useful, when the object graph is very big, to define maximum depth for the traversal.
is it possible to do today?
The text was updated successfully, but these errors were encountered: