jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotates those types for data-binding with Jackson, Gson, etc

Github星跟踪图

jsonschema2pojo Build Status Maven Central

jsonschema2pojo generates Java types from JSON Schema (or example JSON) and can annotate those types for data-binding with Jackson 1.x, Jackson 2.x or Gson.

Note: there are breaking changes between 0.5.1 and 1.0.0. Check the change log. Anything marked in bold in the 1.0.0 alpha, beta and final release is a breaking change.

Try jsonschema2pojo onlineor brew install jsonschema2pojo

You can use jsonschema2pojo as a Maven plugin, an Ant task, a command line utility, a Gradle plugin or embedded within your own Java app. The Getting Started guide will show you how.

A very simple Maven example:

<plugin>
    <groupId>org.jsonschema2pojo</groupId>
    <artifactId>jsonschema2pojo-maven-plugin</artifactId>
    <version>1.0.2</version>
    <configuration>
        <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
        <targetPackage>com.example.types</targetPackage>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Useful pages:

Project resources:

Licensed under the Apache License, Version 2.0.

Special thanks to YourKit, who support this project through a free license for their full-featured YourKit Java Profiler.

主要指标

概览
名称与所有者joelittlejohn/jsonschema2pojo
主编程语言Java
编程语言Java (语言数: 5)
平台
许可证Apache License 2.0
所有者活动
创建于2013-06-22 22:28:53
推送于2024-12-19 23:29:11
最后一次提交2024-09-28 22:39:15
发布数70
最新版本名称jsonschema2pojo-1.2.2 (发布于 2024-09-19 22:51:56)
第一版名称jsonschema2pojo-0.2.0 (发布于 2011-11-17 23:57:50)
用户参与
星数6.3k
关注者数194
派生数1.7k
提交数1.3k
已启用问题?
问题数1189
打开的问题数181
拉请求数253
打开的拉请求数64
关闭的拉请求数166
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?