Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jsonschema2pojo

> 包管理
Open source

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

6.4K stars0 likes2 views
WebsiteGitHub

About

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

jsonschema2pojo

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

Try jsonschema2pojo online
or brew install jsonschema2pojo

You can use jsonschema2pojo as a Maven plugin, 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:

xml
<plugin>
    <groupId>org.jsonschema2pojo</groupId>
    <artifactId>jsonschema2pojo-maven-plugin</artifactId>
    <version>1.3.3</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>

A very simple Gradle example:

groovy
plugins {
  id "java"
  id "org.jsonschema2pojo" version "1.3.3"
}

repositories {
  mavenCentral()
}

jsonSchema2Pojo {
  targetPackage = 'com.example'
}

Useful pages:

  • Getting started
  • How to contribute
  • Reference
  • Latest Javadocs
  • Documentation for the Maven plugin
  • Documentation for the Gradle plugin

Project resources:

  • Downloads
  • Mailing list

Special thanks:

  • unkish
  • Thach Hoang
  • Dan Cruver
  • Ben Manes
  • Sam Duke
  • Duane Zamrok
  • Christian Trimble
  • YourKit, who support this project through a free license for the YourKit Java Profiler.

Licensed under the Apache License, Version 2.0.

Issues· 250 open

View all issuesOpen on GitHub
  • #1818

    Use Jakarta not Javax @Generated annotation

    Updated Jun 29, 2026
  • #1822

    Idea: feature to add accept() methods for Visitor classes

    Updated Jun 13, 2026
  • #1819

    Upgrade outdated dependencies: javaparser and codemodel

    Updated May 13, 2026
  • #1816

    typo in JsonSchemaExtension#setTargetLangauge

    Updated May 9, 2026
  • #1806

    Request for 1.3.4 release

    Updated Apr 28, 2026
  • #1563

    Mirror "deprecated" annotation from JSON schema in the generated code

    Updated Apr 21, 2026
  • #1804

    Refactor JsonSchema2POJO To Be Extendable And Customizable

    Updated Apr 10, 2026
  • #1783

    Jbang

    Updated Feb 26, 2026
  • #1362

    Validating container elements by annotating type arguments of parameterized types

    Updated Feb 2, 2026
  • #1461

    Maven plugin's `includeGeneratedAnnotation` does not support `jakarta.annotation.Generated`

    Updated Feb 1, 2026

> Tags

Javagradle-plugingsonjacksonjava

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 24, 2026
Category包管理
PricingOpen source

> Related tools

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image