JโJSON โ Java POJO
A POJO (Plain Old Java Object) is a simple Java class not tied to any specific framework. The DTO/VO pattern for mapping REST API requests and responses to Java classes is extremely common in Spring Boot and other Java backends. Writing these classes by hand from a JSON payload is tedious and error-prone. This tool automatically generates Java classes from JSON, incorporating your choice of Lombok annotations, Jackson property bindings, and nested class hierarchies.
How to Use
- 1Paste JSON
Paste the JSON you want to convert on the left. Nested objects and arrays are handled automatically.
- 2Configure Options
Set the root class name, package name, Lombok style (@Data, @Getter/@Setter, @Builder, or plain getters/setters), and @JsonProperty mode.
- 3Copy Result
Review the generated Java code on the right and click the copy button to paste it into your IDE.
Tips
- ๐กNested JSON objects are automatically converted to static inner classes.
- ๐ก@JsonProperty is added automatically when the JSON key and Java field name differ (e.g., snake_case โ camelCase).
- ๐กLombok @Data generates getters, setters, equals, hashCode, and toString in one annotation.
- ๐กPaste an API response JSON directly to quickly scaffold a ResponseDTO class.