Reputation: 8995
I used http://www.jsonschema2pojo.org/ to create Java bean classes from a JSON page which I am trying to parse and it generated 6 classes. Now I am stuck on how to tell GSON to map the data to those classes. Any help would be highly appreciated.
Upvotes: 0
Views: 388
Reputation: 2218
Gson gson = new Gson();
Foo foo2 = (Foo)gson.fromJson(json, Foo.class);
Upvotes: 1