Skip to content

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

License

Notifications You must be signed in to change notification settings

fdutton/jsonschema2pojo

This branch is 95 commits behind joelittlejohn/jsonschema2pojo:master.

Folders and files

NameName
Last commit message
Last commit date
Dec 18, 2021
Jun 5, 2022
May 3, 2022
Aug 6, 2022
Jun 5, 2022
Aug 6, 2022
Mar 19, 2021
Jun 5, 2022
Dec 30, 2015
May 3, 2022
Sep 11, 2017
May 3, 2022
May 30, 2012
Jan 27, 2020
May 3, 2022
Aug 29, 2012
Jun 22, 2013
Mar 19, 2021
Feb 28, 2021
May 3, 2022

Repository files navigation

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 2.x or Gson.

Try jsonschema2pojo online
or 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.1.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.

YourKit

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 95.4%
  • HTML 2.2%
  • Groovy 1.7%
  • Other 0.7%