[ 
https://issues.apache.org/jira/browse/WW-4428?focusedWorklogId=1008488&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1008488
 ]

ASF GitHub Bot logged work on WW-4428:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Mar/26 10:03
            Start Date: 09/Mar/26 10:03
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #1616:
URL: https://github.com/apache/struts/pull/1616

   ## Summary
   
   Backport of #1603 to the 6.8.x branch.
   
   - Add serialization/deserialization support for 6 java.time types 
(`LocalDate`, `LocalDateTime`, `LocalTime`, `ZonedDateTime`, `OffsetDateTime`, 
`Instant`) using ISO-8601 defaults
   - Add Calendar deserialization support (was serialize-only)
   - `@JSON(format="...")` annotation works for per-field custom formats on all 
new types
   - Existing `Date`/`Calendar` serialization behavior unchanged
   
   Fixes [WW-4428](https://issues.apache.org/jira/browse/WW-4428)
   
   ## Test plan
   
   - [x] Each java.time type serializes to expected ISO format
   - [x] Each java.time type deserializes from ISO string
   - [x] `@JSON(format="dd/MM/yyyy")` custom format works for serialization and 
deserialization
   - [x] Calendar deserialization works
   - [x] Null value handling for temporal types
   - [x] Round-trip test: serialize → deserialize → assert equality (LocalDate, 
Instant, ZonedDateTime)
   - [x] Custom format for OffsetDateTime serialization and deserialization
   - [x] Malformed input throws JSONException
   - [x] Existing Date/Calendar tests still pass (regression)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)




Issue Time Tracking
-------------------

    Worklog Id:     (was: 1008488)
    Time Spent: 0.5h  (was: 20m)

> Add support for new Java 8 LocalDate and LocalDateTime to the JSON plugin
> -------------------------------------------------------------------------
>
>                 Key: WW-4428
>                 URL: https://issues.apache.org/jira/browse/WW-4428
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.3.20
>            Reporter: Alessandro Nistico
>            Assignee: Lukasz Lenart
>            Priority: Major
>              Labels: JSON
>             Fix For: 6.9.0, 7.2.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The JSONWriter and the JSONPopulator do not handle the new LocalDate and 
> LocalDateTime as primitive date values and will handle them through 
> introspection which will create the wrong JSON object.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to