mercredi 3 août 2016

Gson - parsing json with field that is array or string

I'm trying to parse some json with Gson and I have following problem:

This is fragment of my json:

...
{
  "label": "Check Digit",
  "value": "W"
},
{
  "label": "Equipment",
  "value": [
    "With Standard Liftgate",
    "(-) Version Packages"
  ]
}
...

How to make Gson to parse it and use value as Array of String always?

Aucun commentaire:

Enregistrer un commentaire