diff --git a/src/core/lombok/extern/jackson/Jacksonized.java b/src/core/lombok/extern/jackson/Jacksonized.java index 5e28bf07..059c93d7 100644 --- a/src/core/lombok/extern/jackson/Jacksonized.java +++ b/src/core/lombok/extern/jackson/Jacksonized.java @@ -47,7 +47,7 @@ import lombok.experimental.SuperBuilder; * also a {@code @Builder} or a {@code @SuperBuilder}; a warning is emitted * otherwise. *
- * In particular, the annotation does the following: + * In particular, the annotation does the following for {@code @(Super)Builder}: *
- @Jacksonized was introduced as experimental feature in lombok v1.18.14.
+ @Jacksonized was introduced as experimental feature for @Builder and @SuperBuilder in lombok v1.18.14.
+
+ Support for @Accessors was added in lombok v1.18.40.
- The @Jacksonized annotation is an add-on annotation for @Builder and @SuperBuilder.
- It automatically configures the generated builder class to be used by Jackson's deserialization.
+ The @Jacksonized annotation is an add-on annotation for @Builder, @SuperBuilder, and @Accessors.
+
+ For @Accessors(fluent = true) on a type, it automatically configures Jackson to use the generated setters and getters for (de-)serialization by inserting @JsonProperty annotations.
+ (Note that @Jacksonized @Accessors on fields are not supported.)
+@Jacksonized @Accessors(fluent = true)
+@Getter @Setter
+public class AccessorsExample {
+ private int age = 10;
+}
+
+ For @Builder and @SuperBuilder, it automatically configures the generated builder class to be used by Jackson's deserialization.
It only has an effect if present at a context where there is also a @Builder or a @SuperBuilder; a warning is emitted otherwise.
Without @Jacksonized, you would have to customize your builder class(es).
@@ -29,7 +41,7 @@ public class JacksonExample {
<@f.smallPrint>
- In particular, the annotation does the following:
+ In particular, the annotation does the following for @(Super)Builder:
@JsonDeserialize(builder=Foobar.FoobarBuilder[Impl].class)) on the class (where Foobar is the name of the annotated class, and Impl is added for @SuperBuilder).