public abstract class CycleDetectionStrategy extends Object
| Modifier and Type | Field and Description |
|---|---|
static JSONArray |
IGNORE_PROPERTY_ARR |
static JSONObject |
IGNORE_PROPERTY_OBJ |
static CycleDetectionStrategy |
LENIENT
Returns empty array and null object
|
static CycleDetectionStrategy |
NOPROP
Returns a special object (IGNORE_PROPERTY_OBJ) that indicates the entire
property should be ignored
|
static CycleDetectionStrategy |
STRICT
Throws a JSONException
|
| Constructor and Description |
|---|
CycleDetectionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
abstract JSONArray |
handleRepeatedReferenceAsArray(Object reference)
Handle a repeated reference
Must return a valid JSONArray or null. |
abstract JSONObject |
handleRepeatedReferenceAsObject(Object reference)
Handle a repeated reference
Must return a valid JSONObject or null. |
public static final JSONArray IGNORE_PROPERTY_ARR
public static final JSONObject IGNORE_PROPERTY_OBJ
public static final CycleDetectionStrategy LENIENT
public static final CycleDetectionStrategy NOPROP
public static final CycleDetectionStrategy STRICT
public abstract JSONArray handleRepeatedReferenceAsArray(Object reference)
reference - the repeated reference.public abstract JSONObject handleRepeatedReferenceAsObject(Object reference)
reference - the repeated reference.