Very nice tool !
Enable to visualize how will look the generated java POJO code by giving its json schema representation.
For ex:
Assuming the following Json schema:
{
"type":"object",
"properties": {
"foo": {
"type": "string"
},
"bar": {
"type": "integer"
},
"baz": {
"type": "boolean"
}
}
}
You'll obtain the following JAVA POJO class:
-----------------------------------com.example.Example.java-----------------------------------
package com.example;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
(JsonInclude.Include.NON_NULL)
("org.jsonschema2pojo")
({
"foo",
"bar",
"baz"
})
public class Example {
("foo")
private String foo;
("bar")
private Integer bar;
("baz")
private Boolean baz;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
("foo")
public String getFoo() {
return foo;
}
("foo")
public void setFoo(String foo) {
this.foo = foo;
}
("bar")
public Integer getBar() {
return bar;
}
("bar")
public void setBar(Integer bar) {
this.bar = bar;
}
("baz")
public Boolean getBaz() {
return baz;
}
("baz")
public void setBaz(Boolean baz) {
this.baz = baz;
}
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}