using the http://www.jsonschema2pojo.org/
a json like:
{
"type":"object",
"working":true,
"id":1
}
will produce
-----------------------------------com.example.Example.java-----------------------------------
package com.example;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Example {
@SerializedName("type")
@Expose
private String type;
@SerializedName("working")
@Expose
private Boolean working;
@SerializedName("id")
@Expose
private Long id;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Boolean getWorking() {
return working;
}
public void setWorking(Boolean working) {
this.working = working;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}