[ 
https://issues.apache.org/jira/browse/WW-3780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pelladi Gabor updated WW-3780:
------------------------------

    Attachment: WW-3780.diff

Patch that changes visibility.
                
> Make json plugin more extendable
> --------------------------------
>
>                 Key: WW-3780
>                 URL: https://issues.apache.org/jira/browse/WW-3780
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>    Affects Versions: 2.3.1.2
>            Reporter: Pelladi Gabor
>            Priority: Minor
>         Attachments: WW-3780.diff
>
>
> Currently it is difficult to modify/extend the current behaviour of the json 
> plugin.
> I had the following problem. We use joda-time because it is much better than 
> standard Date. The json plugin cannot handle classes like LocalDate, which is 
> not a problem in itself. But it needs a lot of boilerplate code to output 
> beans containing a LocalDate field using json. Currently I have to create 
> duplicates of the service layer DTO-s, annotate the fields in the UI copy 
> with @JSONFieldBridge, and copy one DTO into the other using dozer or 
> something.
> This creates a lot of useless code and manual work. It would be much easier 
> if I could extend JSONWriter and add support for my joda-time classes. No 
> duplication of DTO-s, no need to manually annotate all fields. This would 
> require only to modify the visibility of some private methods to protected, 
> and some package-protected classes to public. This way I could create my 
> struts2 result type, which extends JSONResult, and use my writer, which 
> extends JSONWriter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to