determine
public static JSONObjectType.Type determine(JSONObject json)
Determine the respective object type for a given JSONObject. This
method inspects the object to figure out what type of object it
represents. This is useful when processing JSON events of mixed type
from a stream, in which case you may need to know what type of object
to construct, or how to handle the event properly.
- Parameters:
json
- the JSONObject whose type should be determined
- Returns:
- the determined JSONObjectType, or null if not recognized