JSON-API responses made safe to avoid JSON_ERROR_UTF8 errors