stleary / JSON-java

A reference implementation of a JSON package in Java.
http://stleary.github.io/JSON-java/index.html
Other
4.54k stars 2.56k forks source link

JSON parsing self reference object and array #823

Closed sk02241994 closed 11 months ago

sk02241994 commented 1 year ago

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

stleary commented 1 year ago

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

sk02241994 commented 1 year ago

@stleary master is merged to my branch.

stleary commented 11 months ago

@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.

stleary commented 11 months ago

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

stleary commented 11 months ago

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