A value in the JSON may be optional, so using optJSONObject is better because you just have to check if it is null or not and continue your function.
A value in the JSON may be optional, so using optJSONObject is better because you just have to check if it is null or not and continue your function.