免费 · 开发
JSON 转 Java record.
把 JSON 示例转换为带 Jackson @JsonProperty 注解的 Java record,可选字段使用包装类型,并支持嵌套 record。
Loading the calculator…
使用方法: JSON 转 Java record
输入数据或选择文件,调整设置并生成结果。复制或下载之前,请检查结果。
限制与支持格式
输入内容在您的设备上处理。
英语技术说明
Needs Java 16+ and jackson-databind 2.12+. Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded.
Integers map to long, decimals to double, lists to List<T>; optional fields use Long, Double or Boolean so they can be null. Java keywords get a trailing underscore.
The sample becomes public record User(long id, @JsonProperty("user_name") String userName, …) with Order and Address nested inside.