mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-07 11:10:08 +08:00
a comment added to explain the use of HashMap
to avoid misconception of contributors about using HashMap to implement a JSON object as a unordered collection by the definition
This commit is contained in:
@@ -164,6 +164,7 @@ public class JSONObject {
|
||||
* Construct an empty JSONObject.
|
||||
*/
|
||||
public JSONObject() {
|
||||
// HashMap is used on purpose to ensure that elements are unordered
|
||||
this.map = new HashMap<String, Object>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user