This is my code.
JSONObject jsono = new JSONObject(response);
JSONArray jarray = jsono.getJSONArray("restaurents");
if(!jarray.equals("null")) {
//District value is not null
Toast.makeText(getContext(), "not null", Toast.LENGTH_LONG).show();
}else {
Toast.makeText(getContext(), " null", Toast.LENGTH_LONG).show();
}
And this is my json responce.
{ "status": "success", "restaurents": null }