Friday, 15 March 2013

java - Deserialize array of integers using gson -



java - Deserialize array of integers using gson -

this must stupid question, how 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 can access array this:

requisition.requisitions[0]

java android json

No comments:

Post a Comment