Skip to content
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

Protect against circular objects #28

Open
FireyFly opened this issue Oct 27, 2011 · 1 comment
Open

Protect against circular objects #28

FireyFly opened this issue Oct 27, 2011 · 1 comment

Comments

@FireyFly
Copy link

Currently, feeding a circular object to JSONSelect means it'll recurse until the call stack is exceeded. Keeping track on which objects has been traversed and protecting against circular references (i.e. not traversing objects that have already been traversed) would prevent this from happening.

For an example of how it can be done, you can look at node's util.inspect (though you probably already know about it, I bet ;) ).

@santivazquez
Copy link

same issue here! thx for this commit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants