I have a Management Client plug-in. I listing cameras per Recording server using MIP SDK:
- Create instance of ManagementServer
- Find RecordingServer
- Get hardwares
- Iterate over hardwares and get cameras for each of them
In one customer environment I have the following exception:
VideoOS.Platform.JsonHandling.TokenException: Exception of type ‘VideoOS.Platform.JsonHandling.TokenException’ was thrown.
at VideoOS.Platform.JsonHandling.JsonReader.ReadNumber(TokenType& tokenType)
at VideoOS.Platform.JsonHandling.JsonReader.NextToken()
at VideoOS.Platform.JsonHandling.JsonReader.BuildList(String parentKey)
at VideoOS.Platform.JsonHandling.JsonReader.BuildArray(String key)
at VideoOS.Platform.JsonHandling.JsonReader.BuildList(String parentKey)
at VideoOS.Platform.JsonHandling.JsonObject..ctor(String json)
at VideoOS.Platform.JsonHandling.JsonObject.Parse(String json)
at VideoOS.Platform.Proxy.RestApi.RestApiClient.GetResources(String resourceType, String id, String childResourceType)
at VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.CallWithRetry[TResult](Func`2 call)
at VideoOS.Platform.Proxy.RestApi.RestApiClientDecorator.GetChildItems(String path)
at VideoOS.Platform.Proxy.ConfigApi.ConfigurationApiItemWrapper.Children()
at VideoOS.Platform.ConfigurationItems.CameraFolder.get_Cameras()
It is raised for some of the hardwares - I mean for some of them API is returning cameras properly, for some hardwares it is failing with the Exception above (at VideoOS.Platform.ConfigurationItems.CameraFolder.get_Cameras()).
Nikolay.