Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
37 lines
1.2 KiB
Java
37 lines
1.2 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package de.maxhenkel.voicechat.org.json;
|
|
|
|
import de.maxhenkel.voicechat.org.json.JSONException;
|
|
import de.maxhenkel.voicechat.org.json.JSONObject;
|
|
import java.util.Enumeration;
|
|
import java.util.Properties;
|
|
|
|
public class Property {
|
|
public static JSONObject toJSONObject(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 Properties toProperties(JSONObject jo) throws JSONException {
|
|
Properties properties = new Properties();
|
|
if (jo != null) {
|
|
for (String key : jo.keySet()) {
|
|
Object value = jo.opt(key);
|
|
if (JSONObject.NULL.equals(value)) continue;
|
|
properties.put(key, value.toString());
|
|
}
|
|
}
|
|
return properties;
|
|
}
|
|
}
|
|
|