should return null to say that there are no more records
throw exception when json isn't returned