反序列化类字段时发生错误,不支持指定方法

时间:2013-11-22 21:22:14

标签: c# json mongodb serialization deserialization

我尝试反序列化一个复杂的对象,如下例所示,并获得此运行时错误:

An error occurred while deserializing the LastJobs field of class sqCore.sqTask: 
An error occurred while deserializing the QueryResult field of class sqCore.sqQueryJob: 
An error occurred while deserializing the Titles field of class sqCore.sqQueryResult: Specified method is not supported.

这是对象(我试图只采用它的重要部分..希望有效)

我猜问题出现在“RuntimeType”或“Null”中 但我不知道如何解决它。

{
  "_id" : ObjectId("528fc2412feaa3230854e000"),
  (...)
  "CurrentJobs" : 
      [{
         "_t" : "sqQueryJob",
         "Result" : { },
         "DB" : {(...)},
         "QueryResult" : null,
         (...)
      }],
  "LastJobs" : 
      [{
         "_t" : "sqQueryJob",
         "Result" : { },
         "DB" : {(...)},
         "QueryResult" : 
           {
           "Titles" : [["LogTime", {"_t" : "RuntimeType"}], ["TaskName", {"_t" : "RuntimeType"}], ["LogMessage", {"_t" : "RuntimeType"}]],
           "Params" : [[ISODate("2013-11-22T20:44:42.433Z"), "MainApp", "MSSQL DB connection has been made."]]
           },
      }],
  (...)
}

谢谢!

0 个答案:

没有答案