Package net.sf.json.util
Interface JsonEventListener
-
public interface JsonEventListener
Defines the contract to handle JsonEvents when building an object or array.- Author:
- Andres Almiray
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onArrayEnd()
Ttriggered when reaching the end of an array.void
onArrayStart()
triggered when the start of an array is encountered.void
onElementAdded(int index, java.lang.Object element)
Triggered when an element has been added to the current array.void
onError(JSONException jsone)
Triggered when an exception is thrown.void
onObjectEnd()
triggered when reaching the end of an object.void
onObjectStart()
Triggered when the start of an object is encountered.void
onPropertySet(java.lang.String key, java.lang.Object value, boolean accumulated)
Triggered when a property is set on an objectvoid
onWarning(java.lang.String warning)
Triggered when a warning is encountered.
-
-
-
Method Detail
-
onArrayEnd
void onArrayEnd()
Ttriggered when reaching the end of an array.
-
onArrayStart
void onArrayStart()
triggered when the start of an array is encountered.
-
onElementAdded
void onElementAdded(int index, java.lang.Object element)
Triggered when an element has been added to the current array.- Parameters:
index
- the index where the element was addedelement
- the added element
-
onError
void onError(JSONException jsone)
Triggered when an exception is thrown.- Parameters:
jsone
- the thrown exception
-
onObjectEnd
void onObjectEnd()
triggered when reaching the end of an object.
-
onObjectStart
void onObjectStart()
Triggered when the start of an object is encountered.
-
onPropertySet
void onPropertySet(java.lang.String key, java.lang.Object value, boolean accumulated)
Triggered when a property is set on an object- Parameters:
key
- the name of the propertyvalue
- the value of the propertyaccumulated
- if the value has been accumulated over 'key'
-
onWarning
void onWarning(java.lang.String warning)
Triggered when a warning is encountered.- Parameters:
warning
- the warning message
-
-