Expand my Community achievements bar.

Deserializing an array within a bean -- problem

Avatar

Level 1
When getting the results from a webservice call, if the flex
client receives a bean that contains an array of length 0, that
array appears to be deserializing improperly. I would expect it to
deserialize to an ArrayCollection of length 0 but what I see is:



In Flex 2.0.1hotfix3, the ArrayCollection is null.



In Flex 3:

If the array is of an arbitrary bean, the ArrayCollection is
length 1, first element is null.

If the array is of ints, the ArrayCollection is length 1,
first element is NaN.

If the array is of booleans,the ArrayCollection is length 1,
first element is false.



Is there something that I'm missing, or has someone
determined a way around this issue?



(Note that this is an array *within* a bean. If the
webservice call returns a 0-length array *not* in a bean, the
deserialized ArrayCollection is of length 0, which is what I would
expect)



Thank you.
0 Replies