[ 
https://issues.apache.org/jira/browse/WW-3780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13243303#comment-13243303
 ] 

Hudson commented on WW-3780:
----------------------------

Integrated in Struts2 #441 (See [https://builds.apache.org/job/Struts2/441/])
    WW-3780 makes JSON plugin more extendable (Revision 1307897)

     Result = SUCCESS
lukaszlenart : 
Files : 
* 
/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONReader.java
* 
/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
* 
/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
* 
/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java

                
> 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
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.2
>
>         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