背景
{
"markdownPercentage": 20,
"currency": "SEK",
"startDate": "2019-07-25"
}
Run Code Online (Sandbox Code Playgroud)
{
"markdownPercentage": 20,
"currency": "SEK",
"startDate": "2019-07-25"
}
Run Code Online (Sandbox Code Playgroud)
问题
当应用程序尝试将消息反序列化到对象时,它会引发以下异常
public class Markdown {
@JsonProperty("markdownPercentage")
@NotNull
private Integer markdownPercentage = 0;
@JsonProperty("currency")
@NotNull
private String currency = "";
@JsonFormat(
shape = Shape.STRING,
pattern = "yyyy-MM-dd"
)
@JsonProperty("startDate")
@NotNull
private ZonedDateTime startDate;
// Constructors, Getters, Setters etc.
} …Run Code Online (Sandbox Code Playgroud)