paul-stinchcombe / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

deserialize many arraylist inside a class using gson #460

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a class with multiple Lists.  How can I deserialize it using gson?

My class ...

    Class Data
    {

    List<String> actor;
    List<Integer> text_relevance;
    List<String> title;
    }

The json string is as follows ... 
Is the class design for this json correct?

    {"data":{
            "actor":["Abercrombie, Ian","Baker, Dee Bradley","Burton, Corey",
                     "Eckstein, Ashley","Futterman, Nika","Kane, Tom",
                     "Lanter, Matt","Taber, Catherine","Taylor, James Arnold",
                     "Wood, Matthew"],
            "text_relevance":["308"],
            "title":["Star Wars: The Clone Wars"]
        }
    }

Original issue reported on code.google.com by gowtham....@gmail.com on 15 Jul 2012 at 12:03

GoogleCodeExporter commented 9 years ago
Not a bug! Please use stackoverflow for "how do I" questions.

Original comment by limpbizkit on 2 Sep 2012 at 9:34