You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "John Lindal (JIRA)" <ji...@apache.org> on 2011/06/01 02:07:47 UTC
[jira] [Resolved] (WW-3489) JSON plugin with excludeNullProperties
and map objects keeps writing fields with null values
[ https://issues.apache.org/jira/browse/WW-3489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Lindal resolved WW-3489.
-----------------------------
Resolution: Fixed
Fix Version/s: 2.3
> 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