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

Add optional max-depth option when parsing so there aren't any stack overflows #10

Open
madeso opened this issue May 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@madeso
Copy link
Owner

madeso commented May 28, 2019

Currently the array and object parsing is stack based. What does this mean? Given a json file 1.json containing [1] and another 3.json containing [[[3]]] the library currently parses 1000.json without a problem on my test machines but encounters a stack overflow on 1000000.json.

@madeso madeso added the enhancement New feature or request label May 28, 2019
@madeso
Copy link
Owner Author

madeso commented Jun 6, 2019

Add optional int to parse that is negative by default. Positive is max depth, negative is infinite. This doesn't change the behavior of existing code.

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

No branches or pull requests

1 participant