Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  GetSystemPresences Error

    Posted 06-05-2025 18:05

    grimdj | 2017-03-23 14:00:35 UTC | #1

    Hi,

    I'm trying to get a list of System Presences using the GetSystemPresences call under the PresenceAPI. In the documentation it says the return value should be a List(Of SystemPresences), but In Visual Studio it is telling me the return type is just a SystemPresence object. I can compile and run when I declare my return object as SystemPresence, but If I try and declare my return object as a List(Of SystemPresence) I cant compile.. Once the call is made when I declare my return object as just SystemPresence an exception thrown that says

    "An unhandled exception of type 'ININ.PureCloudApi.Client.ApiException' occurred in ININ.PureCloudApi.dll

    Additional information: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'ININ.PureCloudApi.Model.SystemPresence' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.

    To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array."

    The function call doesn't accept any parameters so im not sure if there is anything else I could do to try and fix this. Any help would be appreciated.

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/4e782e6acd9145eabc56d940d53012c15fef14df.PNG" width="690" height="160">

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/5013abc7cbd0b7e4e9e2606f9b6d45a4159656d0.PNG" width="690" height="146">

    Thanks


    tim.smith | 2017-03-23 19:36:56 UTC | #2

    Looks like that was fixed as of version 0.70.2.331 (current is 0.106.13.415). Try updating the package.


    system | 2017-08-28 19:33:18 UTC | #3


    This post was migrated from the old Developer Forum.

    ref: 1095