This repository was archived by the owner on Mar 5, 2024. It is now read-only.
This repository was archived by the owner on Mar 5, 2024. It is now read-only.
Using SDK and Deserialization Exceptions #107
Open
Description
I am follow code sample on https://github.com/Autodesk-Forge/forge-api-dotnet-client/blob/master/docs/DerivativesApi.md#getmetadata
try
{
Metadata result = apiInstance.GetMetadata(urn, acceptEncoding);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DerivativesApi.GetMetadata: " + e.Message );
}
I am getting exception about unable to convert to Metadata (deserilization).
It looks like I need to modify to this to avoid this error/exception.
Autodesk.Forge.Model.DynamicJsonResponse result = await apiInstance.GetMetadataAsync(urn, acceptEncoding);
Metadata m = result.ToObject<Metadata>();
Now I can get the Metadata result. Can you confirm this is correct?
Metadata
Metadata
Assignees
Labels
No labels