JSON to Java is an easy-to-use tool that converts JSON into Java classes by copying, pasting, and converting.
It provides the following features:
Tip: You can customize the Java class name and package name.
Input JSON string:
{
"id":1,
"name":"John",
"age":24 }
Output Java class result:
package com.online.compiler.json2bean;
/**
* auto gen:2024-08-09 15:9:0
*
* @author www.online-compiler.com
* @website http://www.online-compiler.com/json/json2java/
*/
public class OnlineCompiler {
private int id;
private String name;
private int age;
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setAge(int age) {
this.age = age;
}
public int getAge() {
return age;
}