General purpose JSON API client