mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
* Updates array constructor and bulk operations to best guess capacity information
* Update JSONObject to allow best guess for initial capacity.
This commit is contained in:
parent
ef7a5e40be
commit
9c092753b0
3 changed files with 25 additions and 7 deletions
|
@ -41,7 +41,7 @@ public class Property {
|
|||
* @throws JSONException
|
||||
*/
|
||||
public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException {
|
||||
JSONObject jo = new JSONObject();
|
||||
JSONObject jo = new JSONObject(properties == null ? 0 : properties.size());
|
||||
if (properties != null && !properties.isEmpty()) {
|
||||
Enumeration<?> enumProperties = properties.propertyNames();
|
||||
while(enumProperties.hasMoreElements()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue