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

Hudson commented on WW-3489:
----------------------------

Integrated in Struts2 #305 (See 
[https://builds.apache.org/hudson/job/Struts2/305/])
    WW-3489 if excludeNullProperties, ignore nulls in maps

jafl : 
Files : 
* 
/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
* 
/struts/struts2/trunk/plugins/json/src/test/java/org/apache/struts2/json/JSONWriterTest.java
* 
/struts/struts2/trunk/plugins/json/src/test/resources/org/apache/struts2/json/jsonwriter-write-bean-03.txt


> JSON plugin with excludeNullProperties and map objects keeps writing fields 
> with null values
> --------------------------------------------------------------------------------------------
>
>                 Key: WW-3489
>                 URL: https://issues.apache.org/jira/browse/WW-3489
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.1
>         Environment: Linux/Debian 2.6.32-5-686, Tomcat 6.0.26, Struts2 2.2.1, 
> struts2-json-plugin
>            Reporter: Antonio Saco
>            Assignee: John Lindal
>            Priority: Minor
>             Fix For: 2.3
>
>
> After adding the excludeNullProperties param to JSON-type result, when the 
> object to serialize is a map and the value of an entry is null, keeps writing 
> fields with null values like {property_name: null}
> If you change JSONWriter (line 356): Object value = entry.getValue(); if 
> (!excludeNullProperties || value != null) { ..... } everything is ok.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to