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

a comment added to explain the use of HashMap #347

Merged
merged 2 commits into from
Jun 12, 2017
Merged

Conversation

ttulka
Copy link
Contributor

@ttulka ttulka commented Jun 8, 2017

to avoid misconception of contributors about using HashMap to implement a JSON object as a unordered collection by the definition

to avoid misconception of contributors about using HashMap to implement
a JSON object as a unordered collection by the definition
@stleary
Copy link
Owner

stleary commented Jun 9, 2017

Since we are going to document this in the code, let's include a thorough explanation, e.g. what design goal is met by using an unordered container and why an ordered container is specifically not used. You can use the text from the Wiki, although I think your own interpretation could be better. This is a good example of how not all code is inherently self-documenting.

to avoid implementators' misconceptions and tries to reimplement the
JSON object to keep the elements order
@ttulka
Copy link
Contributor Author

ttulka commented Jun 9, 2017

I tried my best. There is actually not a lot of information about this issue and I see several misconceptions in the discussion forums. So, the explanation is very welcome, I guess :-)

@stleary
Copy link
Owner

stleary commented Jun 9, 2017

What problem does this code solve?
Comment-only change. Since the JSONObject internal container is such a popular object for change, a comment is added to address why it was done this way.

Risks
None

Changes to the API?
No

Will this require a new release?
Can be rolled into the next release

Should the documentation be updated?
No

Does it break the unit tests?
No

Was any code refactored in this commit?
No

Review status
ACCEPTED Starting 3 day timer.

@stleary stleary merged commit 5b2e5e7 into stleary:master Jun 12, 2017
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