程序包 com.sh.json

类 AbstractJSON

java.lang.Object
com.sh.json.AbstractJSON
直接已知子类:
JSONArray, JSONObject

public abstract class AbstractJSON extends Object
Base class for JSONObject and JSONArray.
  • 构造器详细资料

    • AbstractJSON

      public AbstractJSON()
  • 方法详细资料

    • addInstance

      protected static boolean addInstance(Object instance)
      Adds a reference for cycle detection check.
      参数:
      instance - the reference to add
      返回:
      true if the instance has not been added previously, false otherwise.
    • fireArrayEndEvent

      protected static void fireArrayEndEvent(JsonConfig jsonConfig)
      Fires an end of array event.
    • fireArrayStartEvent

      protected static void fireArrayStartEvent(JsonConfig jsonConfig)
      Fires a start of array event.
    • fireElementAddedEvent

      protected static void fireElementAddedEvent(int index, Object element, JsonConfig jsonConfig)
      Fires an element added event.
      参数:
      index - the index where the element was added
      element - the added element
    • fireErrorEvent

      protected static void fireErrorEvent(JSONException jsone, JsonConfig jsonConfig)
      Fires an error event.
      参数:
      jsone - the thrown exception
    • fireObjectEndEvent

      protected static void fireObjectEndEvent(JsonConfig jsonConfig)
      Fires an end of object event.
    • fireObjectStartEvent

      protected static void fireObjectStartEvent(JsonConfig jsonConfig)
      Fires a start of object event.
    • firePropertySetEvent

      protected static void firePropertySetEvent(String key, Object value, boolean accumulated, JsonConfig jsonConfig)
      Fires a property set event.
      参数:
      key - the name of the property
      value - the value of the property
      accumulated - if the value has been accumulated over 'key'
    • fireWarnEvent

      protected static void fireWarnEvent(String warning, JsonConfig jsonConfig)
      Fires a warning event.
      参数:
      warning - the warning message
    • removeInstance

      protected static void removeInstance(Object instance)
      Removes a reference for cycle detection check.
    • _processValue

      protected Object _processValue(Object value, JsonConfig jsonConfig)