ServiceStack/ServiceStack.Text — Issue #48: Exception when serializing graphs with cyclic references
Author: Jake456
Created: 2011-11-17 14:35:32+00:00
State: open

public class Foo
{
public string A { get; set; }
public Foo OtherFoo { get; set; }
}

...

var foo = new Foo();
foo.OtherFoo = foo;

var val = TypeSerializer.SerializeToString(a);

throws an exception.

The above class doesn't look very realistic, but you easily encounter scenarios like this, e.g with Customer.Order and Order.Customer relationships.