Open ericjisaac opened 2 years ago
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.
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