[Json-rpc-java] Recursion Problem with Sets

Arthur Blake arthur.blake at gmail.com
Wed Sep 12 12:20:18 SGT 2007


Sorry for the lag on this response!  I've confirmed this.

Yes the BeanSerializer is the only serializer that explicitly detects
circular references.  Sets, Maps and Lists of each other do not properly do
this circular reference detection and will cause an infinite loop that
eventually terminates in a stack overflow.

William Becker and I are currently working on support for Circular
References, which indirectly will solve this problem by actually supporting
the circular references.


On 8/10/07, Corey Samuels <Corey.Samuels at kaplan.com> wrote:
>
> Hello,
>
> We're experiencing a recursion problem when serializing Java objects in
> this situation:
>
>
>
> Object A has a set of Object Bs
>
> Object B has a reference to Object A
>
>
>
> I know that the recursion problem was dealt with around line 230 of
> BeanSerializer. My sense is that a different SerializerState object is
> being used once the Set object is reached (in the SetSerializer), so
> there is no previous knowledge of beans already serialized in parent
> objects.
>
>
>
> I'd appreciate a confirmation of this and any ideas on how to work
> around this.
>
>
>
> Thanks!
>
> Corey
>
>
>
>
>
>
>
> ----------------------------------------------
>
> Corey Samuels
>
> Technical Lead
>
> Kaplan Test Prep and Admissions
>
> 1440 Broadway
>
> New York, NY, USA
>
>
>
> 1 (212) 453-7524
>
> 1 (917) 453-2862
>
> corey_samuels at kaplan.com
>
> ----------------------------------------------
>
>
>
> _______________________________________________
> Json-rpc-java mailing list
> Json-rpc-java at oss.metaparadigm.com
> http://oss.metaparadigm.com/mailman/listinfo/json-rpc-java
>


More information about the Json-rpc-java mailing list