在Java中,我们什么时候可以调用@JsonAnyGetter和@JsonAnySetter注解?
@JsonAnyGetter 注释允许使用Map作为我们想要序列化为 JSON 和 @JsonAnySetter 的属性的容器 annotation 指示Jackson在JSON对象中的所有未识别字段上调用相同的setter方法,这意味着所有未映射到Java对象中的属性或setter方法的字段。
语法
public @interface JsonAnyGetter public @interface JsonAnyGetter登录后复制