草庐IT

JSonDocument

全部标签

c# - MongoDB 未知鉴别器值 => 反序列化为 JSonDocument

在MongoDB中,我有一个类,其属性MyProperty的类型为object。publicMyClass{publicobjectMyProperty;publicstringProp1;publicDateTimeProp2;publicintProp3;}MongoDB的序列化在创建这种类型的JSon时没有任何问题:MyProperty":{"_t":"ExampleClass",[...]}但是当我尝试对它进行序列化时,出现以下错误:AnerroroccurredwhiledeserializingtheMyPropertypropertyofclassMyClass:Unkn