I'm trying to serialize an object tree that looks something like this:

- owners
    - date
    - collections (list of collection objects)
        - filter
        - videos (list of video objects)
            - filter

So the tree has a list of "Collection" objects and each collection has a
list of "Video" objects.  Both Collection and Video objects contain a Filter
object which is what causes the problem in the JSON serialization.  If I
rename the filter variable in Video to "videoFilter" (or anything different
than "filter") then serialization works fine but if both objects have a
child with the same name then things get all mixed up.

By mixed up I mean I get a valid JSON object back but the tree is all
rearranged so that pieces a Collection object appear at the root of the tree
and nothing is in the proper place.

Has anyone else seen this problem?  Are there any fixes/workarounds other
than renaming properties?

Thanks,

Stephen

Reply via email to