alexandroid/decompiled/jadx/sources/org/json/Property.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

33 lines
1.2 KiB
Java

package org.json;
import java.util.Enumeration;
import java.util.Properties;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes11.dex */
public class Property {
public static JSONObject toJSONObject(Properties properties) throws JSONException {
JSONObject jSONObject = new JSONObject();
if (properties != null && !properties.isEmpty()) {
Enumeration<?> propertyNames = properties.propertyNames();
while (propertyNames.hasMoreElements()) {
String str = (String) propertyNames.nextElement();
jSONObject.put(str, properties.getProperty(str));
}
}
return jSONObject;
}
public static Properties toProperties(JSONObject jSONObject) throws JSONException {
Properties properties = new Properties();
if (jSONObject != null) {
for (String str : jSONObject.keySet()) {
Object opt = jSONObject.opt(str);
if (!JSONObject.NULL.equals(opt)) {
properties.put(str, opt.toString());
}
}
}
return properties;
}
}