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

Make decoder non-recursive #8

Open
lilyball opened this issue Oct 27, 2016 · 1 comment
Open

Make decoder non-recursive #8

lilyball opened this issue Oct 27, 2016 · 1 comment

Comments

@lilyball
Copy link
Collaborator

A recursive decoder means we can't decode arbitrarily-deep JSON hierarchies. If we switch to storing our decoding state in an array instead of on the stack, we can remove this limitation.

Note: Test performance to make sure that using an array doesn't noticeably slow down the decoder.

@lilyball
Copy link
Collaborator Author

lilyball commented Nov 9, 2016

I'm not sure this really matters. The current default cap is a depth of 10,000, and it seems rather unlikely to have real-world JSON that even hits this cap, let alone needs more. The motivation for this issue is largely the fact that I'd like to not need a cap at all, but I suspect a non-recursive decoder would be sufficiently complicated so as not to be worth the effort.

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

1 participant