A worked example, rendered from real sample data. Sign in to run the tool on your own input.
{"id":1,"name":"Alice","email":"alice@example.com","age":30,"active":true}import java.util.List;
public class Root {
private int id;
private String name;
private String email;
private int age;
private boolean active;
public int getId() { return id; }
public void setId(int id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getEmail() { return email; }
public void setEmail(String email) { this.email = email; }
public int getAge() { return age; }
public void setAge(int age) { this.age = age; }
public boolean getActive() { return active; }
public void setActive(boolean active) { this.active = active; }
}
Generate a POJO Java class with getters/setters from a JSON sample. Part of the DevTools Surf developer suite. Browse more tools in the Converters collection.