下面代碼會報一個編譯錯誤
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiInBnauAzMlNjZ3I2YmVjN50iYlVDOtMmN4MTLwQDO30yM3Q2YxYjYy8CX3ITO38CX5ATMw8CX05WZth2YhRHdh9CXkF2bsBXdvwVbvNmLllXZ0lmLywGZvw1LcpDc0RHaiojIsJye.jpg)
這段代碼是我寫的,在我的eclipse中沒有報錯,但是在别人的ide中卻報錯.
解決方法:
baseresponsedto result = null;
object responsetextobj = response.get("responsetext");
if (responsetextobj instanceof baseresponsedto) {
result = (baseresponsedto) responsetextobj;
} else {
result = (baseresponsedto) jsonextension.parseobject((string) responsetextobj, clazz);
}