Last active
May 18, 2019 12:17
-
-
Save donchan922/60524ab654fd1f60727fab87d71e4e89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// レスポンスの中に定義したフィールド以外の項目があっても無視する | |
@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