Skip to content

JsonDeserializer fails to convert empty json array into dictionary. #318

@niemyjski

Description

@niemyjski

C# Code

    public Dictionary<string, object> ExtendedData { get; set; }

Returned JSON Snippet

,
"ExtendedData":{

},

Unable to cast object of type 'RestSharp.JsonArray' to type 'System.Collections.Generic.IDictionary2[System.String,System.Object]'. at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element) at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value) at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary2 data)
at RestSharp.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response)
at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions