Exception:Error converting value "System.Drawing.Bitmap" to type 'System.Drawing.Bitmap'. Path ''.Could not cast or convert from System.String to System.Drawing.Bitmap.

报错信息

JsonSerializationException: Error converting value "System.Drawing.Bitmap" to type 'System.Drawing.Bitmap'. Path ''.
--LineNumber: 0
--LinePosition: 0
StackTrace:
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   在 Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
   在 Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
   在 Newtonsoft.Json.Linq.JToken.ToObject[T]()
   在 DynamicClass.<Chat>d__7f.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

ArgumentException: Could not cast or convert from System.String to System.Drawing.Bitmap.
--Message: Could not cast or convert from System.String to System.Drawing.Bitmap.
StackTrace:
   在 Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
   在 Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)

 

解决方法

暂无解决方案。

相关信息
0 查看
2024-06-01 22:52
Quicker版本
版本 反馈次数