net.sf.json.util
Class CycleDetectionStrategy

Base class for cycle detection in a hierarchy.
The JSON spec forbides cycles in a hierarchy and most parsers will raise and
error when a cycle is detected. This class defines a contract for handling
those cycles and two base implementations:

STRICT - will throw a JSONException if a cycle is found.

LENIENT - will return an empty array or null object if a cycle is found.