Skip to content

Conversation

@kommradHomer
Copy link

I have added these isEmpty() methods for JSONObject and JSONArray classes and have been using them on production environment with no trouble , for a long time.

Actually i also make this pull request to learn why there is no isEmpty method on these classes.

@douglascrockford
Copy link
Contributor

No thank you.

@kommradHomer
Copy link
Author

so why is there no isEmpty method on these classes ?

@johnjaylward
Copy link
Contributor

@kommradHomer Likely because JSONObject and JSONArray don't implement Collection interfaces and there is a way to determine empty using public methods already (see your implementation).

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.

3 participants