我有使用GSON庫的反序列化問題。GSON反序列化問題
以下是JSON代碼,我嘗試反序列化
{"response": {
"@service": "CreateUser",
"@response-code": "100",
"@timestamp": "2010-11-27T15:52:43-08:00",
"@version": "1.0",
"error-message": "",
"responseData": {
"user-guid": "023804207971199"
}
}}
我創建了以下類
public class GsonContainer {
private GsonResponse mResponse;
public GsonContainer() { }
//get & set methods
}
public class GsonResponse {
private String mService;
private String mResponseCode;
private String mTimeStamp;
private String mVersion;
private String mErrorMessage;
private GsonResponseCreateUser mResponseData;
public GsonResponse(){
}
//gets and sets method
}
public class GsonResponseCreateUser {
private String mUserGuid;
public GsonResponseCreateUser(){
}
//get and set methods
}
調用GSON庫中的數據爲空後。任何想法什麼是錯誤的類?
THX提前爲您的幫助......我想這是一些小事....
這是不正確的。 – 2011-06-06 22:27:52