-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Consider detecting cycles when constructing JSONObjects #632
Comments
No objections if anyone would like to try to implement this. |
Hi @stleary I would like to try to implement this. |
Sure @guptnis, please go ahead |
See #633 |
Hi, @stleary I was just wondering what is the depth fo the bean? if it's multilevel parent-child relationship or just single level. To clarify more, this is providing the 1st level functions of the class do we have to consider the child level of the |
@gdmanandamohon another developer is working on this issue, let's give him a chance to finish his work. |
Closing this issue since a solution has been accepted. See #645 |
JSONObject.populateMap
mentions that "the bean can not be recursive", and attempting to pass a recursive bean toJSONObject
results in aStackOverflowError
. TheStackOverflowError
can be hard to debug, because the stack trace is usually truncated before the frames that show wherenew JSONObject(bean)
was called.It might be worth detecting cycles when constructing
JSONObjects
to report a better error message for beans containing cycles.The text was updated successfully, but these errors were encountered: