code: public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException {
          // can't use the new constructor for Android support
          // JSONObject jo = new JSONObject(properties == null ? 0 : properties.size());
          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;
      }
docs: Converts a property file object into a JSONObject. The property file object is a table of name value pairs.
  @param properties java.util.Properties
  @return JSONObject
  @throws JSONException