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

Added clear() methods to JSONObject and JSONArray #577

Merged
merged 4 commits into from
Dec 7, 2020

Conversation

stranck
Copy link
Contributor

@stranck stranck commented Dec 4, 2020

I noticed that there wasn't this easy way to clear all the childs of a JSONObject or a JSONArray, so I added it.
Changes in code are really simple

@stleary
Copy link
Owner

stleary commented Dec 4, 2020

@stranck Thanks for submitting this PR. The submitter is usually asked to provide a use case or justification, but I guess in this case it is self-evident. No objection to proceeding after you add the appropriate unit tests.

(I hope they works :c)
@stranck
Copy link
Contributor Author

stranck commented Dec 4, 2020

I should've added them :)
Tell me if they're alright and thank you for being so fast in replying ahahahhaha

@stleary
Copy link
Owner

stleary commented Dec 5, 2020

What problem does this code solve?
This is an enhancement to include a missed clear() method, not a bug fix. The API includes JSONObject and JSONArray methods that recognize they are containers, so adding this method makes sense.

Risks
Low

Changes to the API?
New public methods are added to JSONObject and JSONArray

Will this require a new release?
No

Should the documentation be updated?
No

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

Was any code refactored in this commit?
No

Review status
APPROVED

@stleary
Copy link
Owner

stleary commented Dec 5, 2020

Starting 3-day comment window

This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants