made JSONArray Iterable#130
Conversation
See the documentation for details. Also changed the documentation accordingly.
toJSONString
|
I'm not a fan of the default implementation you have to toJSONString. If you break that out into a separate pull request it would be better. I do like that you updated the JSONException to take a throwable argument as that's one of the first things I changed myself. I'm also not sure what changed in most of those files. If it was whitespace changes, you should not have committed those. Try to keep file formatting as close to the projects formatting as possible so that multiple committers aren't fighting over whitespace and line wrapping issues. |
|
oh, nevermind, I see the changes. Please don't rename the files. Other pull requests have done this and been rejected. |
|
Well if one doesn't like the default implementation he is always free to override it (he will have to anyway especially if not all fields should be overriden). I just made something which I thought to be the most straightforward implementation for this.
|
|
Thank you for the iterable contribution. Pending comments, it will be merged in a few days on #132. I notice that using an iterator can require a lot of casting that was previously managed by the existing API, but I think some will find it helpful. File moves have been declined numerous times in previous pull requests. At this point, I don't see a compelling use case for changing JSONString. |
this gives you the possibility to use them in Java's for-each loops
Edit: I also moved the source into a subfolder with the package to make it easier to clone and edit the project