mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-12-20 10:11:01 +08:00
- Introduced JSONObject(int) constructor.
- int > Initial capacity of the underlying data structure
- Test for new introduced JSONArray(int) constructor.
1. Checked with input parameter: 0
2. Checked with input parameter: positive number
3. Checked with positive number input parameter and compared length
4. If input parameter is negative number JSONException is thrown:
JSONArray initial capacity cannot be negative.