我有字符串
{"_t":"P","command":{"_t":"DuelCommand","duelStatus":"Waiting"}}
课程:
public class P{
PingCommand command;
}
public abstract class PingCommand{
public virtual void DoCommand(){
}
}
public class DuelCommand : PingCommand {
public virtual void DoCommand(){
}
}
反序列化时,我给了PingCommand而不是DuelCommand,我该怎么办呢?