mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Java 1.8.
This commit is contained in:
parent
48d31b7f5c
commit
a9a0762383
26 changed files with 747 additions and 819 deletions
|
@ -31,7 +31,7 @@ import java.util.Properties;
|
|||
/**
|
||||
* Converts a Property file data into JSONObject and back.
|
||||
* @author JSON.org
|
||||
* @version 2013-05-23
|
||||
* @version 2014-05-03
|
||||
*/
|
||||
public class Property {
|
||||
/**
|
||||
|
@ -50,7 +50,6 @@ public class Property {
|
|||
}
|
||||
}
|
||||
return jo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,13 +61,12 @@ public class Property {
|
|||
public static Properties toProperties(JSONObject jo) throws JSONException {
|
||||
Properties properties = new Properties();
|
||||
if (jo != null) {
|
||||
Iterator keys = jo.keys();
|
||||
|
||||
Iterator<String> keys = jo.keys();
|
||||
while (keys.hasNext()) {
|
||||
String name = keys.next().toString();
|
||||
String name = keys.next();
|
||||
properties.put(name, jo.getString(name));
|
||||
}
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue