## org.codehaus.groovy.grails.web.json.parser
Class JSONParser

    java.lang.Object
      org.codehaus.groovy.grails.web.json.parser.JSONParser

All Implemented Interfaces:
  JsonParserConstants

    public final class JSONParser

extends Object
implements JsonParserConstants

Field Summary
`(package private) SimpleCharStream` `jj_input_stream`
`Token` `jj_nt` Next token.
`Token` `token` Current token.
`JsonParserTokenManager` `token_source` Generated Token Manager.

Fields inherited from interface org.codehaus.groovy.grails.web.json.parser.JsonParserConstants
`CHAR, CNTRL_ESC, DEFAULT, DIGITS, DOUBLE_QUOTE_LITERAL, E, ENDQUOTE, EOF, ESC_STATE, ESCAPE_CHAR, HEX, HEX_CHAR, HEX_ESC, HEX_STATE, QUOTE, SINGLE_QUOTE_LITERAL, STRING_STATE, tokenImage, UNICODE_CHAR`

Constructor Summary
`JSONParser(InputStream stream)` Constructor with InputStream.
`JSONParser(InputStream stream, String encoding)` Constructor with InputStream and supplied encoding
`JSONParser(JsonParserTokenManager tm)` Constructor with generated Token Manager.
`JSONParser(Reader stream)` Constructor.

Method Summary
`void` `disable_tracing()` Disable tracing.
`void` `enable_tracing()` Enable tracing.
`ParseException` `generateParseException()` Generate ParseException.
`Token` `getNextToken()` Get the next Token.
`Token` `getToken(int index)` Get the specific Token.
`Object` `parse()`
`JSONElement` `parseJSON()`
`void` `ReInit(InputStream stream)` Reinitialise.
`void` `ReInit(InputStream stream, String encoding)` Reinitialise.
`void` `ReInit(JsonParserTokenManager tm)` Reinitialise.
`void` `ReInit(Reader stream)` Reinitialise.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### token_source

    public JsonParserTokenManager token_source

  Generated Token Manager.

### jj_input_stream

    SimpleCharStream jj_input_stream

### token

    public Token token

  Current token.

### jj_nt

    public Token jj_nt

  Next token.

Constructor Detail

### JSONParser

    public JSONParser(InputStream stream)

  Constructor with InputStream.

### JSONParser

    public JSONParser(InputStream stream,
                      String encoding)

  Constructor with InputStream and supplied encoding

### JSONParser

    public JSONParser(Reader stream)

  Constructor.

### JSONParser

    public JSONParser(JsonParserTokenManager tm)

  Constructor with generated Token Manager.

Method Detail

### parse

    public final Object parse()
                       throws ParseException

  Throws:
    `ParseException`

### parseJSON

    public final JSONElement parseJSON()
                                throws ParseException

  Throws:
    `ParseException`

### ReInit

    public void ReInit(InputStream stream)

  Reinitialise.

### ReInit

    public void ReInit(InputStream stream,
                       String encoding)

  Reinitialise.

### ReInit

    public void ReInit(Reader stream)

  Reinitialise.

### ReInit

    public void ReInit(JsonParserTokenManager tm)

  Reinitialise.

### getNextToken

    public final Token getNextToken()

  Get the next Token.

### getToken

    public final Token getToken(int index)

  Get the specific Token.

### generateParseException

    public ParseException generateParseException()

  Generate ParseException.

### enable_tracing

    public final void enable_tracing()

  Enable tracing.

### disable_tracing

    public final void disable_tracing()

  Disable tracing.

Copyright (c) 2005-2009 The Grails project