com-dot-app-sancharsaathi-1-5-0.apk
Download file
package Y2;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public abstract class g {
public static Object a(Object obj) {
if (obj == null) {
return JSONObject.NULL;
}
if ((obj instanceof JSONArray) || (obj instanceof JSONObject) || obj.equals(JSONObject.NULL)) {
return obj;
}
try {
if (obj instanceof Collection) {
JSONArray jSONArray = new JSONArray();
for (Object a4 : (Collection) obj) {
jSONArray.put(a(a4));
}
return jSONArray;
} else if (obj.getClass().isArray()) {
JSONArray jSONArray2 = new JSONArray();
int length = Array.getLength(obj);
for (int i4 = 0; i4 < length; i4++) {
jSONArray2.put(a(Array.get(obj, i4)));
}
return jSONArray2;
} else if (obj instanceof Map) {
JSONObject jSONObject = new JSONObject();
for (Map.Entry entry : ((Map) obj).entrySet()) {
jSONObject.put((String) entry.getKey(), a(entry.getValue()));
}
return jSONObject;
} else if ((obj instanceof Boolean) || (obj instanceof Byte) || (obj instanceof Character) || (obj instanceof Double) || (obj instanceof Float) || (obj instanceof Integer) || (obj instanceof Long) || (obj instanceof Short)) {
return obj;
} else {
if (obj instanceof String) {
return obj;
}
if (obj.getClass().getPackage().getName().startsWith("java.")) {
return obj.toString();
}
return null;
}
} catch (Exception unused) {
}
}
}
Download file