public static Properties toProperties(JSONObject jo)  throws JSONException {
        Properties  properties = new Properties();
        if (jo != null) {
            Iterator keys = jo.keys();

            while (keys.hasNext()) {
                String name = keys.next().toString();
                properties.put(name, jo.getString(name));
            }
        }
        return properties;
    }