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

JSON parsing self reference object and array #823

Merged
merged 5 commits into from
Dec 27, 2023

Conversation

sk02241994
Copy link
Contributor

Fix for issue #743
Self reference issue found in JSONObject and JSONArray

@stleary
Copy link
Owner

stleary commented Nov 27, 2023

@sk02241994 Out of sync, please merge master to your branch.

@sk02241994
Copy link
Contributor Author

@stleary master is merged to my branch.

@stleary stleary changed the title JSON parsion self reference object and array JSON parsing self reference object and array Dec 9, 2023
@stleary
Copy link
Owner

stleary commented Dec 22, 2023

@sk02241994 For now, we just want JSONParserConfiguration to act as a marker class. All of the required functionality is already in the base class ParserConfiguration, so you can leverage that. Future commits will add more config properties.
Will go through the changes to JSONObject and JSONArray later.

* @param value
* The Map value.
* @param jsonParserConfiguration
* Configuration for recursive depth
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just call this a configuration object. The things that it can configure will change going forward

*
* @param recursionDepth
* Variable to keep the count of how nested the object creation is happening.
* @param recursionDepth
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to jsonParserConfiguration

@stleary
Copy link
Owner

stleary commented Dec 23, 2023

@sk02241994 Looks good, couple remaining items to clean up, nothing functional though.

@stleary
Copy link
Owner

stleary commented Dec 24, 2023

What problem does this code solve?
Fixes potential stackoverflow errors due to exceeding maximum nesting depth

Does the code still compile with Java6?
Yes

Risks
Low

Changes to the API?
No, some new API methods were added

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No. Also, new unit tests were added.

Was any code refactored in this commit?
No

Review status
APPROVED

Starting 3-day comment window

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

Successfully merging this pull request may close these issues.

2 participants