问题描述:

this must be a stupid question, but how to deserialize this? (using Gson)

{"Requisitions":[129,127,124,46,40,39,38,37,36,35,34,33]}

网友答案:
class RequisitionsClass {
    int[] Requisitions;
}    

RequisitionsClass requisition = new Gson().fromJson(json, RequisitionsClass.class);

then you can access the array like this:

requisition.Requisitions[0]
相关阅读:
Top