From eae3277e13dbb9b75b30663f3aef4a9b421df68d Mon Sep 17 00:00:00 2001 From: "Kim, Joo Hyuk" Date: Wed, 31 Dec 2025 20:14:54 +0900 Subject: [PATCH] Update `@JsonInclude` as per databind#5369 --- .../com/fasterxml/jackson/annotation/JsonInclude.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java b/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java index 5011ec74..d1948e81 100644 --- a/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java +++ b/src/main/java/com/fasterxml/jackson/annotation/JsonInclude.java @@ -45,9 +45,15 @@ *

* In addition to {@code Map}s, {@code content} concept is also supported for referential * types (like {@link java.util.concurrent.atomic.AtomicReference}). - * Note that `content` is NOT currently (as of Jackson 2.20) supported for + *

+ * (For Jackson 2 only) Note that `content` is NOT currently (as of Jackson 2.20) supported for
  * arrays or {@link java.util.Collection}s; support may be added in
  * future versions (but if so, will be configurable to allow disabling it).
+ *
+ * (For Jackson 3 only) As of Jackson 3.1.0, {@link #content()} also supports {@link java.util.Collection}'s
+ * when {@code tools.jackson.databind.SerializationFeature#APPLY_JSON_INCLUDE_FOR_COLLECTIONS}
+ * feature is enabled --disabled by default for backward-compatibility. (see [databind#5369] for more detail)
+ * Note that `content` is NOT currently (as of Jackson 3.1.0) supported for arrays, but may be supported in future versions.
  *
  * @since 2.0
  */