序列化注解
@JsonAnyGetter
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
private String username;
private Integer age;
private Map<String, String> properties = new HashMap<>();
@JsonAnyGetter
public Map<String, String> getProperties() {
return properties;
}
public void add(String key, String value) {
properties.put(key, value);
}
}@JsonGetter
@JsonPropertyOrder
@JsonRawValue
@JsonValue
@JsonRootName
@JsonSerialize
最后更新于