Models may introduce loops when resolving relationships:
@type(...)
class Node {
@relationship(...)
Node parent;
// etc.
}
If the JSON for this Node has a parent relationship pointing to itself, the stack blows.
Even if the author makes poor modeling decisions, probably some protections should be put in place to avoid blowing the stack.