[
https://issues.apache.org/jira/browse/WW-5652?focusedWorklogId=1031147&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1031147
]
ASF GitHub Bot logged work on WW-5652:
--------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jul/26 18:48
Start Date: 19/Jul/26 18:48
Worklog Time Spent: 10m
Work Description: lukaszlenart commented on PR #1792:
URL: https://github.com/apache/struts/pull/1792#issuecomment-5016954033
Please resolve conflicts
Issue Time Tracking
-------------------
Worklog Id: (was: 1031147)
Time Spent: 20m (was: 10m)
> Support Java record serialization and Optional handling in Struts JSON plugin
> -----------------------------------------------------------------------------
>
> Key: WW-5652
> URL: https://issues.apache.org/jira/browse/WW-5652
> Project: Struts 2
> Issue Type: Improvement
> Reporter: Sri Lakshmi Kanthan P
> Priority: Major
> Fix For: 7.3.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This change updates the Struts JSON plugin to properly handle Java record
> classes and java.util.Optional values.
> Record classes are now serialized through record components, since
> Introspector.getBeanInfo() does not expose record accessors as standard
> JavaBeans properties. This also allows annotations such as @JSON and
> @JSONFieldBridge to be placed directly on record components.
> Optional values now serialize as the contained value, or null when empty.
> Optional.empty() is treated the same as null when excludeNullProperties is
> enabled, for both bean/record properties and map values.
> Please review the implementation and the overall approach. If there are any
> improvements or changes needed, I am happy to update the PR.
> GitHub Pull Request:
> https://github.com/apache/struts/pull/1792
--
This message was sent by Atlassian Jira
(v8.20.10#820010)