Class JSONScanner

java.lang.Object
com.alibaba.fastjson.parser.JSONLexerBase
com.alibaba.fastjson.parser.JSONScanner
All Implemented Interfaces:
JSONLexer, Closeable, AutoCloseable

public class JSONScanner extends JSONLexerBase implements Closeable
  • Field Details

    • token

      protected int token
    • calendar

      protected Calendar calendar
    • str

      protected String str
  • Constructor Details

    • JSONScanner

      public JSONScanner(com.alibaba.fastjson2.JSONReader reader)
    • JSONScanner

      public JSONScanner(String str)
    • JSONScanner

      public JSONScanner(String str, int features)
  • Method Details

    • getCalendar

      public Calendar getCalendar()
    • scanISO8601DateIfMatch

      public boolean scanISO8601DateIfMatch()
    • scanISO8601DateIfMatch

      public boolean scanISO8601DateIfMatch(boolean strict)
    • getReader

      public com.alibaba.fastjson2.JSONReader getReader()
      Specified by:
      getReader in interface JSONLexer
    • isOrderedField

      public boolean isOrderedField()
    • stringVal

      public String stringVal()
      Specified by:
      stringVal in interface JSONLexer
    • decimalValue

      public BigDecimal decimalValue()
      Specified by:
      decimalValue in interface JSONLexer
    • token

      public int token()
    • config

      public void config(Feature feature, boolean state)
    • isEnabled

      public boolean isEnabled(Feature feature)
    • isBlankInput

      public boolean isBlankInput()
      Specified by:
      isBlankInput in interface JSONLexer
    • intValue

      public int intValue()
      Specified by:
      intValue in interface JSONLexer
    • longValue

      public long longValue()
      Specified by:
      longValue in interface JSONLexer
    • nextToken

      public final void nextToken()
      Specified by:
      nextToken in interface JSONLexer
    • getCurrent

      public char getCurrent()
      Specified by:
      getCurrent in interface JSONLexer
    • nextToken

      public final void nextToken(int expect)
      Specified by:
      nextToken in interface JSONLexer
    • isEOF

      public boolean isEOF()
      Specified by:
      isEOF in interface JSONLexer
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable