This is an automated email from the ASF dual-hosted git repository. jamesbognar pushed a commit to branch docs in repository https://gitbox.apache.org/repos/asf/juneau.git
commit 65a81f529bb6bcca9c399b5f690d4a3b89acc8b6 Author: James Bognar <[email protected]> AuthorDate: Wed May 13 09:09:01 2026 -0400 docs: remove @MarshalledProp(properties) documentation + add breaking change note for 9.5.0 Co-authored-by: Cursor <[email protected]> --- pages/release-notes/9.5.0.md | 23 +++++++++++++++++++++++ pages/topics/02.04.04.BeanpAnnotation.md | 26 -------------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/pages/release-notes/9.5.0.md b/pages/release-notes/9.5.0.md index 57ddefa870..3fd134c2f8 100644 --- a/pages/release-notes/9.5.0.md +++ b/pages/release-notes/9.5.0.md @@ -103,6 +103,29 @@ public class NewClass { @Override public String toString() { return "value"; } } **Migration:** If you previously used `@BeanIgnore` on a class to force `toString()` serialization, replace it with `@Marshalled(as=STRING)`. If you truly want to suppress serialization (output `null`), use `@MarshalledIgnore`. +#### Removed `@MarshalledProp(properties)` Attribute (breaking) + +The `@MarshalledProp(properties=...)` attribute has been removed. The attribute was used to limit which child properties of a nested bean/map are rendered by serializers: + +```java +// Before — only "f1" was rendered on each child. +public class MyClass { + @MarshalledProp(properties="f1") + public MyChildClass x1 = new MyChildClass(); +} + +// After — the attribute no longer exists; nested beans render in full. +public class MyClass { + public MyChildClass x1 = new MyChildClass(); +} +``` + +The related internal types are gone too: +- `BeanPropertyMeta.applyChildPropertiesFilter(...)`, `BeanPropertyMeta.getProperties()` (override-list accessor), and the underlying `properties` field/builder setter. +- `BeanMetaFiltered` (sole purpose was wrapping a `BeanMeta` with a filtered property list). + +**Migration:** If you need per-property filtering for a serialization, use a custom `BeanFilter`/`@Marshalled(properties=...)` at the bean-class level instead, or configure include/exclude lists on the `MarshallingContext.Builder`. The marshalling-context-level filtering pre-dated `@MarshalledProp(properties)` and remains fully supported. + #### `@Beanp("*")` on non-Map fields On a field whose type is not a `Map`, `@Beanp("*")` (or `@Beanp(name="*")`) no longer tries to register a dyna property. The property name is taken from the field (via the configured `PropertyNamer`); other `@Beanp` attributes still apply. `Map` fields keep the dyna property `*` as before. diff --git a/pages/topics/02.04.04.BeanpAnnotation.md b/pages/topics/02.04.04.BeanpAnnotation.md index b342896822..9601f89563 100644 --- a/pages/topics/02.04.04.BeanpAnnotation.md +++ b/pages/topics/02.04.04.BeanpAnnotation.md @@ -154,32 +154,6 @@ public class MyBean { } ``` -The <a href="/site/apidocs/org/apache/juneau/annotation/MarshalledProp.html#properties()" target="_blank">@MarshalledProp(properties)</a> annotation is used to limit -which child properties are rendered by the serializers. - -It can be used on any of the following bean property types: - -- Beans - Only render the specified properties of the bean. -- Maps - Only render the specified entries in the map. -- Bean/Map arrays - Same but applied to each element in the array. -- Bean/Map collections - Same but applied to each element in the collection. - -```java -public class MyClass { - // Only render 'f1' when serializing this bean property. - @MarshalledProp(properties={"f1"}) - public MyChildClass x1 = new MyChildClass(); -} - -public class MyChildClass { - public int f1 = 1; - public int f2 = 2; -} - -// Renders "{x1:{f1:1}}" -String json = Json.of(new MyClass()); -``` - The <a href="/site/apidocs/org/apache/juneau/annotation/MarshalledProp.html#format()" target="_blank">@MarshalledProp(format)</a> annotation specifies a String format for converting a bean property value to a formatted string.
