From 3a2a61f807eaedd22eab3c6d78653b7de2ae82a4 Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Thu, 5 Mar 2020 16:31:14 +0100 Subject: @Jacksonized: add documentation, changelog --- .../features/experimental/Jacksonized.html | 53 ++++++++++++++++++++++ website/templates/features/experimental/index.html | 4 ++ 2 files changed, 57 insertions(+) create mode 100644 website/templates/features/experimental/Jacksonized.html (limited to 'website') diff --git a/website/templates/features/experimental/Jacksonized.html b/website/templates/features/experimental/Jacksonized.html new file mode 100644 index 00000000..fd2bfe68 --- /dev/null +++ b/website/templates/features/experimental/Jacksonized.html @@ -0,0 +1,53 @@ +<#import "../_features.html" as f> + +<@f.scaffold title="@Jacksonized" logline="Make Jackson use your builders."> + <@f.history> +

+ @Jacksonized was introduced as experimental feature in lombok v1.18.14. +

+ + + <@f.overview> +

+ 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. + 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). + With @Jacksonized, you can simply write something like this to let Jackson use the generated builder:

+@Jacksonized @Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class JacksonExample {
+	private List<Foo> foos;
+}
+
+

+ This annotation is especially useful when deserializing into immutable (sub-)classes that only use @SuperBuilder to create instances. + With @Jacksonized, you do not have to put the complex @SuperBuilder class header into your code just to configure it for Jackson. +

+ This annotation does not change the behavior of the generated builder. + A @Jacksonized @SuperBuilder remains fully compatible to regular @SuperBuilders. +

+ + + <@f.smallPrint> +

+ In particular, the annotation does the following: +

+

+ + diff --git a/website/templates/features/experimental/index.html b/website/templates/features/experimental/index.html index b158d381..dc7870cf 100644 --- a/website/templates/features/experimental/index.html +++ b/website/templates/features/experimental/index.html @@ -71,6 +71,10 @@ <@main.feature title="@Tolerate" href="Tolerate"> Skip, jump, and forget! Make lombok disregard an existing method or constructor. + + <@main.feature title="@Jacksonized" href="Jacksonized"> + Make Jackson use your builders. + <@f.confKeys> -- cgit