I am trying to parse
a JSON
file to Java with GSON
and i have problem
Gson gson = new GsonBuilder().create();
Person p1 = gson.fromJson(new FileReader("/Users/blabla/Desktop/person.json"), Person.class);
System.out.println(p1);
This is my Person class
public class Person {
private String name;
private int age;
private List<String> Friends;
//Getters and setters
This is my JSON File
{
"Name":"TEXT",
"Weight":95,
"Height":1.87,
"Friends":[
"FRIEND1",
"FRIEND2",
"FRIEND3"
]
}
Output is Person@52b2a2d8
What am I doing wrong?