You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
Following the documentation for GetItem results in Exceptions: Exception when calling ItemsApi.GetItems: Cannot implicitly convert type 'Autodesk.Forge.Model.DynamicJsonResponse' to 'Autodesk.Forge.Model.Item'
No working way of getting the typed object was described as part of the resolution for #32 . Either the docs should be updated, or an appropriate way of using the typed objects should be specified.
I need the Item to get its Attributes. Using response.ToObject<Item> on API responses strips Attributes from the object. I can see that all the desired data is present in the DynamicJsonResponse.
For the time being, I have a solution that just parses the JSON, but it seems like a waste if the ability to get the typed object is in fact implemented. Also, the fact that the ToObject<Item>()mostly works makes me unsure whether this is a bug or not (should Attributes be included?).
After further tests, the return from GetFolderContents has a similar issue. The response JSON contains all expected data, but the SDK classes/objects obtained by following the examples in this repo (issues/documentation) are missing data (e.g. Attributes for each individual item). This is in a .NET 6 project.
After further tests, the return from GetFolderContents has a similar issue. The response JSON contains all expected data, but the SDK classes/objects obtained by following the examples in this repo (issues/documentation) are missing data (e.g. Attributes for each individual item). This is in a .NET 6 project.
I have the same problem, any solution? I'm using the latest version (1.9.7) and .NET 6 as well.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Following the documentation for GetItem results in Exceptions:
Exception when calling ItemsApi.GetItems: Cannot implicitly convert type 'Autodesk.Forge.Model.DynamicJsonResponse' to 'Autodesk.Forge.Model.Item'
Similar to #32.
No working way of getting the typed object was described as part of the resolution for #32 . Either the docs should be updated, or an appropriate way of using the typed objects should be specified.
I need the Item to get its Attributes. Using
response.ToObject<Item>
on API responses strips Attributes from the object. I can see that all the desired data is present in the DynamicJsonResponse.Code:
This is using Forge v. 1.9.7 in Visual Studio 2022
The text was updated successfully, but these errors were encountered: