Java 1.8.

This commit is contained in:
Douglas Crockford
2014-05-05 15:09:32 -07:00
parent 48d31b7f5c
commit a9a0762383
26 changed files with 747 additions and 819 deletions

View File

@@ -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;
}
}
}