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
            Priority: Minor


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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to