Skip to content

Instantly share code, notes, and snippets.

@donchan922 donchan922/Value.java
Last active May 18, 2019

Embed
What would you like to do?
// レスポンスの中に定義したフィールド以外の項目があっても無視する
@JsonIgnoreProperties(ignoreUnknown = true)
public class Value {
private Long id;
private String quote;
// 引数なしのコンストラクタを定義しないとデシリアライズ(JSON -> Javaオブジェクトへの変換)時にエラーが起きる
public Value() {
}
public Long getId() {
return this.id;
}
public String getQuote() {
return this.quote;
}
public void setId(Long id) {
this.id = id;
}
public void setQuote(String quote) {
this.quote = quote;
}
@Override
public String toString() {
return "Value{" +
"id=" + id +
", quote='" + quote + '\'' +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.