Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Trying to do Gson...

I started studying the Gson library, I try to do a lot of things about parsing. this is my code and I very appreciate it if someone tell me what I need to do to parsing Gson, this is my code:

package com.trip.android.trip.model; import java.util.List;

public class TripPlaceDetails {

private Geometry geometry; private String icon; private String id; private String name; private OpeningHours openingHours; private List<Photo> photos = null; private String placeId; private String reference; private String scope; private List<String> types = null; private String vicinity;

public Geometry getGeometry() { return geometry; }

public void setGeometry(Geometry geometry) { this.geometry = geometry; }

public String getIcon() { return icon; }

public void setIcon(String icon) { this.icon = icon; }

public String getId() { return id; }

public void setId(String id) { this.id = id; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public OpeningHours getOpeningHours() { return openingHours; }

public void setOpeningHours(OpeningHours openingHours) { this.openingHours = openingHours; }

public List<Photo> getPhotos() { return photos; }

public void setPhotos(List<Photo> photos) { this.photos = photos; }

public String getPlaceId() { return placeId; }

public void setPlaceId(String placeId) { this.placeId = placeId; }

public String getReference() { return reference; }

public void setReference(String reference) { this.reference = reference; }

public String getScope() { return scope; }

public void setScope(String scope) { this.scope = scope; }

public List<String> getTypes() { return types; }

public void setTypes(List<String> types) { this.types = types; }

public String getVicinity() { return vicinity; }

public void setVicinity(String vicinity) { this.vicinity = vicinity; } }

This is my code gson from json:

public TripPlaceDetails getTripPlaceDetails(String jsonString) {

Gson gson = new Gson();
TripPlaceDetails tripPlaceDetails = gson.fromJson(arr.get(i), TripPlaceDetails.class);

so now, what I should do after this code? I don't know what to do?

Thank for Help :)