From: Morgan P. <mo...@mo...> - 2010-05-13 17:45:24
Hello,
I posted this question a while back and got no reponse. Figured I'd try it
again. Thanks!
My java bean has a property, someStringProp, whose value is null.
The JSON generated from this object looks like this:
{"someStringProp":""}
How can I have my generated JSON look like this?
{"someStringProp":null}
thanks,
-Morgan
From: Jonathan G. <jso...@ki...> - 2010-05-13 19:22:34
I think what you're looking for is "Changing the default value of a
null reference" here:
http://json-lib.sourceforge.net/advanced.html
Jonathan
On Thu, May 13, 2010 at 10:45 AM, Morgan Packard
<mo...@mo...> wrote:
> Hello,
> I posted this question a while back and got no reponse. Figured I'd try it
> again. Thanks!
>
> My java bean has a property, someStringProp, whose value is null.
>
> The JSON generated from this object looks like this:
>
> {"someStringProp":""}
>
> How can I have my generated JSON look like this?
>
> {"someStringProp":null}
>
> thanks,
>
> -Morgan
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> json-lib-user mailing list
> jso...@li...
> https://lists.sourceforge.net/lists/listinfo/json-lib-user
>
>