Interface JsonEventListener


  • public interface JsonEventListener
    Defines the contract to handle JsonEvents when building an object or array.
    Author:
    Andres Almiray
    • 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,
                            Object element)
        Triggered when an element has been added to the current array.
        Parameters:
        index - the index where the element was added
        element - 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​(String key,
                           Object value,
                           boolean accumulated)
        Triggered when a property is set on an object
        Parameters:
        key - the name of the property
        value - the value of the property
        accumulated - if the value has been accumulated over 'key'
      • onWarning

        void onWarning​(String warning)
        Triggered when a warning is encountered.
        Parameters:
        warning - the warning message