程序包 org.jsfr.json

类 SurfingContext

    • 方法详细资料

      • startJSON

        public boolean startJSON()
        指定者:
        startJSON 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • endJSON

        public boolean endJSON()
        指定者:
        endJSON 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • startObject

        public boolean startObject()
        指定者:
        startObject 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • endObject

        public boolean endObject()
        指定者:
        endObject 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • startObjectEntry

        public boolean startObjectEntry​(String key)
        指定者:
        startObjectEntry 在接口中 JsonSaxHandler
        参数:
        key - Entry key
        返回:
        Return false to stop the parsing immediately
      • startArray

        public boolean startArray()
        指定者:
        startArray 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • endArray

        public boolean endArray()
        指定者:
        endArray 在接口中 JsonSaxHandler
        返回:
        Return false to stop the parsing immediately
      • primitive

        public boolean primitive​(PrimitiveHolder primitiveHolder)
        指定者:
        primitive 在接口中 JsonSaxHandler
        参数:
        primitiveHolder - PrimitiveHolder
        返回:
        Return false to stop the parsing immediately
      • getCurrentFieldName

        public String getCurrentFieldName()
        指定者:
        getCurrentFieldName 在接口中 ParsingContext
        返回:
        The current field name. Null if current position is not in json object
      • getCurrentArrayIndex

        public int getCurrentArrayIndex()
        指定者:
        getCurrentArrayIndex 在接口中 ParsingContext
        返回:
        The current index of json array. -1 if current position is not in json array
      • load

        public <T> T load​(String key,
                          Class<T> tClass)
        指定者:
        load 在接口中 ParsingContext
        类型参数:
        T - type
        参数:
        key - key
        tClass - class to cast
        返回:
        Saved value
      • cast

        public <T> T cast​(Object object,
                          Class<T> tClass)
        指定者:
        cast 在接口中 ParsingContext
        类型参数:
        T - type
        参数:
        object - object to cast
        tClass - type
        返回:
        casted object
      • shouldBreak

        public boolean shouldBreak()
      • isStopped

        public boolean isStopped()
        指定者:
        isStopped 在接口中 ParsingContext
        返回:
        Whether parsing is stopped
      • isPaused

        public boolean isPaused()
        指定者:
        isPaused 在接口中 ParsingContext
        返回:
        Whether parsing is paused