@Nullable
protected JSONArray parseJSONArray(JSONObject jsonObject, String key) {
JSONArray result = null;
if (jsonObject != null) {
if (jsonObject.has(key)) {
if (!jsonObject.isNull(key)) {
result = jsonObject.optJSONArray(key);
}
}
}
return result;
}
@Nullable
protected JSONObject parseJSONObject(JSONObject jsonObject, String key) {
JSONObject result = null;
if (jsonObject != null) {
if (jsonObject.has(key)) {
if (!jsonObject.isNull(key)) {
result = jsonObject.optJSONObject(key);
}
}
}
return result;
}
protected JSONArray parseJSONArray(JSONObject jsonObject, String key) {
JSONArray result = null;
if (jsonObject != null) {
if (jsonObject.has(key)) {
if (!jsonObject.isNull(key)) {
result = jsonObject.optJSONArray(key);
}
}
}
return result;
}
@Nullable
protected JSONObject parseJSONObject(JSONObject jsonObject, String key) {
JSONObject result = null;
if (jsonObject != null) {
if (jsonObject.has(key)) {
if (!jsonObject.isNull(key)) {
result = jsonObject.optJSONObject(key);
}
}
}
return result;
}