public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException {
  JSONObject jo=new JSONObject();
  if (properties != null && !properties.isEmpty()) {
    Enumeration<?> enumProperties=properties.propertyNames();
    while (enumProperties.hasMoreElements()) {
      String name=(String)enumProperties.nextElement();
      jo.put(name,properties.getProperty(name));
    }
  }
  return jo;
}

public static JSONObject toJSONObject ( java . util . Properties properties ) throws JSONException { JSONObject jo = new JSONObject ( ) ; if ( properties != null && ! properties . isEmpty ( ) ) { Enumeration < ? > enumProperties = properties . propertyNames ( ) ; while ( enumProperties . hasMoreElements ( ) ) { String name = ( String ) enumProperties . nextElement ( ) ; jo . put ( name , properties . getProperty ( name ) ) ; } } return jo ; }
converts a property file object into a jsonobject . the property file object is a table of name value pairs .
