Generate plain old Java objects from JSON or JSON-Schema. For each property present in the 'properties' definition, we add a property to a given Java class according to the JavaBeans spec. A private field is added to the parent class, along with accompanying accessor methods (getter and setter). If additionalProperties is specified and set to the boolean value false, then the generated Java type does not support additional properties. If the additionalProperties node is undefined (not present), null or empty, then a new bean property named "additionalProperties", of type Map<String,Object> is added to the generated type (with appropriate accessors). The accessors are annotated to allow Jackson to marshal/unmarshal unrecognised (additional) properties found in JSON data from/to this map.

Features

  • You can use jsonschema2pojo as a Maven plugin
  • You can use jsonschema2pojo as a command line utility
  • You can use jsonschema2pojo as a Gradle plugin or embedded within your own Java app
  • Description text always appears after title text
  • Using the format rule for a property can influence the Java type chosen to represent your property values
  • The existingJavaType property allows existing Java types to be used in your POJOs

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

Apache License V2.0

Follow jsonschema2pojo

jsonschema2pojo Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of jsonschema2pojo!

Additional Project Details

Programming Language

Java

Related Categories

Java JSON Software

Registered

2021-09-30