Skip to content

GetSearchesCount method returns exception "Could not cast or convert from System.Int64 to System.Collections.Generic.List`1[EmmaSharp.Models.Searches.Search] #33

@MilSix

Description

@MilSix

Hi, it might not be new issue but I just wonder if you guys experience the same error below when call Searches methods?
I created 5 segments and try to call GetSearchesCount to see if it return my count of 5 segments. But I kept getting the error 'Could not cast or convert from System.Int64 to System.Collections.Generic.List`1....

Detail: Error converting value 1 to type 'System.Collections.Generic.List`1[EmmaSharp.Models.Searches.Search]. at

Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type

initialType, Type targetType) at

Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue,

CultureInfo culture, Type targetType) at

Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader

reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions