我已经创建了一个restsharp api:此接口返回常量字符串。the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.Int32,System.String要修复此错误,请将JSON更改为JSON对象(例如{"name":"value"}
我正在使用RestSharp与远程服务器通信。我收到了一个JSON序列化字符串,我可以将其反序列化为c#对象。我还可以将json数组反序列化为List。但是,如果我尝试将属性从List更改为ObservableCollection (或IList、ICollection或Collection),则在反序列化时会出现异常。Unable to cast object of type '
System.InvalidCastException: "Unable to cast object of type 'System.Int64' 堆栈跟踪中的任何地方都不是我们的代码,只是系统代码无法从代码中序列化XYZ类型。System.InvalidCastException: "Unable to cast object of type 'System.In