tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Feng <enjoyj...@gmail.com>
Subject Re: Databinding and null values
Date Wed, 29 Dec 2010 02:11:16 GMT
It seems that Jackson has a config to handle that. I'll try that.

Raymond Feng
Sent from my iPhone

On Dec 28, 2010, at 2:59 PM, Luciano Resende <luckbr1975@gmail.com> wrote:

> When the JSON Databinding produces JSON from a POJO it's generating
> contents from the null attributes (see example below)
> 
> {
>    "id": "000020550372",
>    "links": [
>        {
>            "href": "http://localhost/000020550372",
>            "type": null
>        },
>        {
>            "href": "http://localhost/000020550372/xxx",
>            "type": null
>        }
>    ]
> }
> 
> For performance reasons, I'd like to have a more clean/compact JSON
> output that would avoid generating the null elements.
> Is there an easy way to do that with the Databinding Framework ?
> 
> -- 
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/

Mime
View raw message