2016-08-16 11 views
-1

ModelクラスにリストまたはArrayListを作成する可能性があるかどうかは不思議でした。ModelクラスのArrayList

以下のデータに従って、Modelクラスに渡すConditionListがあります。あなたはJavaの変数にそのようなシンボルを使用することはできませんので

{ 
    "Id": 30, 
    "FirstName": "Lilly", 
    "LastName": "Fowler", 
    "KnownName": "Lills", 
    "GenderId": 14, 
    "DateOfBirth": "2009-03-18T00:00:00", 
    "**ConditionList**": [{ 
     "Child_ConditionId": 11, 
     "Name": "Bee Sting Allergy", 
     "Treatment": "phone me and softly put the bee sting cream on it and smooth it down.The cream will be in her bag", 
     "DoctorName": null, 
     "DoctorContact": null, 
     "MedicationDescription": null 
    }], 
    "CreatedOn": "2015-05-30T19:44:13.2", 
    "UpdatedOn": "2015-06-04T19:29:01.303", 
    "ProfileImage": "http://mobile.aimy.co.nz:80/Media/mum_cropped_4fe98f04-f772-4ac0-ba51-d99fbd119e4b.jpeg" 
}] 

答えて

0
@SerializeName("**ConditionList**") private List<ConditionList> conditionList; 

、あなたが上Gson

+0

取得ERROに欠けているシリアル化の名前を使用する必要があります。それは文字列として渡す必要があります。しかし、いつでもありがとう。 @SerializeName( "** ConditionList **")プライベートList conditionList; –

関連する問題