Generic implementation of AsyncTask to get JSON data using REST.