added support for JSON for the API-resource