I don't think we have much control over null values. As far as I know, null is 
null - can't get any other information about it; i.e. this conditional will 
always return false:

Object o = null;
if (o instanceof Foo) { ... }

Even if o is declared as type Foo, this doesn't work.

But null is a supported JSON type, so this shouldn't really be an issue. As for 
dates - why not just encode them as strings?
 
On Wednesday, April 01, 2009, at 09:16AM, "Sandro Martini" 
<[email protected]> wrote:
>Hi Greg,
>> There are multiple ways we could handle something like this. Can you tell us 
>> more about the specific use case(s) you are attempting to satisfy?
>for example, at server-side i have data returned from query, with
>domain objects as rows already filled (any field of those row objects
>is a standard java object, like Strings, but also Date, Calendar,
>Boolean, etc so i could also handle null values).
>
>So, instead of thinking of a convention to transfer for example Date /
>Calendar objects in json between Server and Clients (and the opposite)
>I'd like to configure the related Serializer with a specific behavior.
>
>But maybe as you said there are more solutions ... can you tell me some hints ?
>
>Tell me if is not clear.
>
>Thanks a lot,
>Sandro
>
>

Reply via email to